Open cjlee112 opened 11 years ago
OK, I performed basic backup procedure from webapps/mongodb directory:
mongodb-linux-x86_64-2.4.1/bin/mongodump --port 26966 --username backup --db spnet --password
tar cvzf dump.tgz dump
I then scp'd the dump.tgz file (18 MB) to a safe location.
Note this first required creating backup user in the spnet db:
mongodb-linux-x86_64-2.4.1/bin/mongo --port 26966 admin
> db.auth('admin', PASSWORD)
> use spnet
> db.addUser( { user: "backup", roles: ["readWrite", "dbAdmin", "userAdmin"], pwd: PASSWORD } )
First note that most spnet data are (also) stored in Google+, so in principle even if we deleted our mongoDB database, only a few "private data" types would be gone forever:
(Everything else could be recovered by one #spnetwork query). All the same, we need to set up a backup process, to protect against data loss in case something bad happens to our webfaction server: