mirror device MySQL dbs to local sqlite files -- every 5min
store the local sqlite files on a network drive -- every 12h
build an index of files for FTP access -- every 12h
We use crontab for the two later scripts and a python daemon for the former.
There are lots of complications due to collision between local and remote backups, and several remote backups starting at the same time. We tried to patch that using file locks, a custom made copying service, stopping the local backup service before running the remote one... All these changes added complexity to the backup system. In the end, we have a lot of corrupted/incomplete files and something a bit obscure
As a result, I will unify the backup in several ways:
the backup daemon will optionnally sync to remote files. The remote location should be set in the .service file
The backupt deamon will also write a file index itself before syncing
Cleanup the unnecessary scripts that are not part of the daemon.
so far, we do three things at regular intervals:
As a result, I will unify the backup in several ways:
.service
file