Backup archives are created in
$KOBO_DOCKER/backups/ folder, each backup target in a separate sub-directory: postgres, mongo and kobocat.
From the point of creation, backup archives are moved to the local destination
/srv/kobo-backups; sub-directory structure is not retained. KoBo Toolbox backup creation mechanism just creates files, deleting nothing. Appropriate method of backup rotation has to be implemented outside KoBo, and in this case it starts with moving.
Local destination is searched for archives older than 31 days, which are removed.
Local destination is then
rsync-ed to remote
/media/kobo-backups/kobo-backups. We do not
rsync directly to
rsync requires full control over destinatkion, so the Windows share itself will not do; but a sub-directory will.
Finally, email notifications are dispatched.
Backup scripts can be started manually, in which case notifications are displayed rather than emailed.
$ cd $KOBO_DOCKER $ sudo docker exec -it kobodocker_kobocat_1 /srv/src/kobocat/docker/backup_media.bash $ sudo docker exec -it kobodocker_mongo_1 /srv/backup_mongo.bash $ sudo docker exec -it kobodocker_postgres_1 /srv/backup_postgres.bash $ sudo /usr/sbin/kobo-backup