Help with empty backups #2541
-
Hi, i'm trying to set up a backup schedule in my instance. I can see that the db service is dumping the database every day, but the files on the backup folder are empty. If I ssh into the docker machine and run backup.sh, then it creates a file with data. But the name is different from the ones that are auto-generated. Can anyone point me on the right direction to fix this? Below are some samples from the backup folder. The empty ones are generated by the db service. -rw-r--r--. 1 root root 0 Dec 21 00:00 backup_bookwyrm_2022-12-21.sql |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
The file name being different sounds like it's potentially pointing at the issue. Could it be that you are using Haven't tested this yet, but I am thinking that when running the backup script through cron in the container it doesn't get that env variable set correctly, vs. when you connect to that docker container and run it manually it does. |
Beta Was this translation helpful? Give feedback.
I have a proposed fix in #2548.
I think there might be an issue with how changes to the
backup.sh
script are applied in an environment that has already been running. I had to remove the backups volume when testing this out locally before it picked up changes to that script. Most likely because it is copied to the docker image on build, but later the path is replaced with a volume, so subsequent changes to that file in the docker image aren't reflected on an existing volume.I wouldn't advise running this on a production instance, but it might work out if you take extra care to backup your backup files first!
I've had to do this for the setup to pick up the new
backup.sh
script from the do…