Schedule backups
Every night, cron or a systemd timer can take a backup.
Take a backup every night without stepping in, with cron or a systemd timer.
Requirements
- Access to
teseladb adminon a node of the cluster. - Space for several backups and a place outside the cluster to take them.
One backup a night with cron
30 2 * * * teseladb admin --dbpath /var/lib/teseladb backup --at now --out /backups/$(date +\%F)Take them elsewhere
Copy each folder somewhere else, for example an object store, once the command finishes.
Check
Every morning there is a new folder with the date of the day and its manifest.bson.
Common problems
- The backup is not taken because the command cannot find the credentials. In cron, give the command
--dbpathor the TLS files.
See also
- Scheduled backups, a step-by-step guide.
- Restore