Skip to content

Best way to backup Manyfold? #3620

Answered by Aevaris
Aevaris asked this question in Support
Discussion options

You must be logged in to vote

Well, I used this opportunity to learn a fair bit.

This can likely be improved, but here is a basic backup script i wrote and then set up to run in cron. It is modularized with variables to be easy to configure for your configuration (and be used for any PostgreSQL database set up with docker compose).

This will backup a postgresql database for the service DockerService for a docker container made by a DockerCompose file located at BackupTarget, gzip it, and save it to the directory located at BackupLoc. It will name the file db-YYYYMMDDHHMMSS.

If anyone has suggestions for improvements, lmk.

DATE=$(date +%Y%m%d-%H%M%S)
BackupTarget="/your/docker/dir/manyfold"
BackupLoc="/mnt/your/backup/…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Aevaris
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants