Hi all,
I was wondering if there is any handy way to setup/schedule a periodical data backup or transfer (e.g. every night) from one app’s managed PSQL database to another apps managed PSQL database on digital ocean? Or what would be the best approach to achieve this, if the backups can’t be used in this way?
Thanks a lot in advance and best regards
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hello,
This can be achieved by following this step-by-step tutorial here on how to backup and restore a MongoDB database:
https://www.digitalocean.com/community/tutorials/how-to-back-up-restore-and-migrate-a-mongodb-database-on-ubuntu-20-04
You can add the commands from the tutorial in a bash script and set that script to run as a cron job every day:
https://www.digitalocean.com/community/tutorials/how-to-use-cron-to-automate-tasks-ubuntu-1804
Hope that this helps!
Best,
Bobby