[feature] Backup in the next boot

Hi!

At the weekend my server is off and I see backups happen on Saturday night. So I have no automatic backups.

Is it possible that the backups are running at the next startup? Or is it possible to set different schedule?

Thanks for your time.

As part of my “update-tt-rss-docker” script I have:

docker exec -it ttrss-docker-backups-1 /bin/mv -v /etc/periodic/weekly/backup /etc/periodic/daily

because I prefer daily backups. You could either just do this as well or look into editing /etc/crontabs/root, which is where the ‘periodic’ stuff is configured. You would need to set up something to edit the file after each docker update though.

Instead of relying on cron inside docker, you could use systemd-timers on your host that runs the backup container on a time basis where it catches up.

(Or you could use systemd inside the container :wink: )

stock backup cronjob is a last resort one-size-fits-all kinda thing for terminally lazy people so they would have something to restore in case things break.
if you need something different, just roll your own. personally i use zfs snapshots.

Thank you, I will study the ideas you have given me.

docker exec -it ttrss-docker_app_1 /bin/sh
mkdir /backups
/etc/periodic/weekly/backup
ls /backups/
exit
docker cp ttrss-docker_app_1:/backups ./