I tried to deploy
Meteor App on
And I would to auto backup my db to free cloud hosting.
Please help me.
I tried to deploy
Free mongodb hosting would probably be very limited. You may run mongo locally on DO server.
Let me know if you’re interested to host mongo at the same server as your app I can provide some useful links.
@dr.dimitru, thanks for your reply.
Please provide some useful likes…
Speaking of backup - I’ve upcoming tutorial for basic Linux + MongoDB backup to private GitHub repository. I can drop you a link once it’s ready if you’re interested.
Thanks again, I will try via your link.
Hmm, a private GitHub repository sounds like a pretty good idea. I’ve been backing up to Google Drive, with “folder versioning”, I think I’m going to switch to that!
@herteby, could ww auto backup to
google drive? could you share?
I’ve set up a cronjob that does this every day:
cd /home/bq/GoogleDrive/mongodump rm -rf yesterday mv latest yesterday mongodump -o latest
It’s not that great though, because if the error is not noticed for two days, the backup will have been overwritten, and I would have to rely on Google Drive’s file versioning, which is not guaranteed.
It’d be about as easy to set up a push to GitHub though. Just mongodump into a git repository and then commit all and push.
gitlab for free private.
So could I auto backup mongodb to this?
Now I use
digitalOcean and Linode for deployment.
@dr.dimitru, could you share
basic Linux + MongoDB backup to private GitHub repository......?
I set up github backup for myself now Here’s a guide:
1. Install git lfs, so that you can have files larger than 100 MB
2. Create a repository on github and clone it to your server.
3. In the repository directory, do the following:
git lfs track "*.bson" git add .gitattributes
4. Write a shell script like this:
cd /home/bq mongodump -o backup cd backup git add . date=`date +'%A %d %B'` git commit -m "$date" git push
(backup is the name i chose for my repository, it can be whatever)
5. Test executing it manually to confirm that everything works.
6. Add the script to a daily cron job (google how to do that if you don’t know)
Btw, you only get 1 gb free LFS storage, then you have to pay $5 / month for up to 50 gb
very thanks, I will try soon
But I use
Have the same solve?
Hope it’s not too late, I’m finally collected all our experience with automated backups into this Tutorial