https://gist.github.com/steveodom/4944432 https://gist.github.com/steveodom/4944432/raw/43605f59343c7626665176334113a27c90068f2a/cf_template.json
ssh -i neo4j.pem ubuntu@IPADDRESS
Where neo4j.pem is the location of your public key an
If you get a 'permissions too open error' on the key, do:
chmod 400 mykey.pem
#Config files
/etc/
eg(/etc/redis/redis.conf)
/etc/neo4j/
#The actual data /var/lib/
You can find where the neo4j directory is by going to the web console/server info. Then click on kernel (the left hand column). Then under StoryDirectory, you'll see something like: /var/lib/neo4j/data/graph.db/
Log file: /var/logs/
Script files: /var/lib/cloud/instance/scripts/
/etc/init.d/neo4j-service restart
/etc/init.d/redis-server restart
/etc/init.d/neo4j-service stop
/etc/init.d/redis-server restart
MANUALLY BACKING UP NEO
/etc/init.d/neo4j-service stop
cd /var/lib/neo4j/data
tar -czf /backup/neo4j/130212.tar.gz graph.db/
Then to pull it down locally: scp -i neo4j.pem ubuntu@IPADDRESS:/backup/neo4j/130212.tar.gz .
scp -r -i neo4j.pem 130212.tar.gz ubuntu@IPaddress:
scp -r -i neo4j.pem ubuntu@54.235.143.6:/backup/neo4j/2013-02-14.tar.gz .
I could not upload it as root or to a different directory. perhaps I should have made a directory so it'd be like: ubuntu@IPADDRESS:/backups
Installed unzip can't remember but if you type unzip and it's not install it will tell you how to install it. (apt-get install unzip)
This unzipped the zip file to my neo data directory. (stop the db first) #zip: unzip -d /var/lib/neo4j/data/graph.db/ a79fe8fca-1360623254.zip #tar /etc/init.d/neo4j-service stop tar -xvzf 130212.tar.gz -C /var/lib/neo4j/data/ rm 130212.tar.gz
Note: I had to change the ownership of all the files after I unzipped in the graph.db direct: chown -Rv neo4j:nogroup /var/lib/neo4j/data/graph.db/
DELETE this below: n/bash LOGFILE=/backup/neo4j/backup.log message() { message_date=$(date) echo "${message_date}: $1" >> $LOGFILE }
neo_service() { service neo4j-service $1 >> $LOGFILE }
set -e message "Starting cold backup." neo_service stop tar -czf /backup/neo4j/$(date +%F).tar.gz /var/lib/neo4j/data >> $LOGFILE 2>&1 neo_service start message "Completed cold backup."