|
|
Steps we follow to backup AS LXC containers:
|
|
|
*Note: all system paths and parameters in this HOWTO are fictional.
|
|
|
A simple tool for backups is [rsync](https://rsync.samba.org/) that copies files from a host to another, and which files can be archived or not, and checks if a file has been modified, or is removed or created, and updates the backup target repository accordingly. But it doesn't create snapshots and thus we cannot access the state of a system's files of a specific date in the past. Dedicated backup tools create snapshots and retain a history of the changes, so we can choose what version to restore. However we need to keep track of the backup's disk storage and remove older snapshots on a regular basis.
|
|
|
|
|
|
Process
|
|
|
|
|
|
Steps we follow to backup LXC containers:
|
|
|
Note: all system paths and parameters in this HOWTO are fictional.
|
|
|
|
|
|
**Process**
|
|
|
- stop the containers (because AS containers were created and managed by root user, they need root privlege to stop them. We solved this by allowing the specific lxc stop/start commands for the backup user via the sudoes.d configuration.)
|
|
|
- backup the containers
|
|
|
- restart the containers
|
|
|
|
|
|
System setup
|
|
|
**System setup**
|
|
|
- a backup 'user'
|
|
|
- ssh keys to access remote backup repo
|
|
|
- password for restic backup command
|
... | ... | |