73 lines
2.6 KiB
Markdown
73 lines
2.6 KiB
Markdown
|
|
# Backup Manager
|
||
|
|
|
||
|
|
IMPORTANT: Backup manager is a work in progress and not all advertised features
|
||
|
|
work. Especially no monitoring has been implemented so you will not know if a
|
||
|
|
backup might fail which might be dangerous!
|
||
|
|
|
||
|
|
## what it does
|
||
|
|
|
||
|
|
Backup manager will allow you to manage restic backup repositories.
|
||
|
|
|
||
|
|
Before you can backup to a restic repository, the repository will need to
|
||
|
|
be initialized. After taking backups, the repository needs to be maintained:
|
||
|
|
|
||
|
|
- Old backups need to be deleted
|
||
|
|
|
||
|
|
- Backups need to be pruned so diskspace will be freed
|
||
|
|
|
||
|
|
- Backups might need to be verified so we are sure the backups are ok
|
||
|
|
|
||
|
|
- Backups need to be monitor'ed so we are sure that they are taken
|
||
|
|
|
||
|
|
- Backups need to be copied so they are not just stored on one location
|
||
|
|
|
||
|
|
|
||
|
|
Backup manager is a ppm-based script that will take care of the above points.
|
||
|
|
It will be ran daily in cron and will do the following steps:
|
||
|
|
|
||
|
|
- Verify that it can login into each and every repository in the configuration file
|
||
|
|
|
||
|
|
It will fail at this point if a repository is unavailable, outputting the
|
||
|
|
shell command to execute if a repository just wasn't initialized yet
|
||
|
|
|
||
|
|
- Verify that all polynomials of the backups are the same.
|
||
|
|
|
||
|
|
This program is made to copy backups from one repository to another. This basically
|
||
|
|
requires repositories to have the same polynomial settings in order to work optimally.
|
||
|
|
|
||
|
|
Backup manager will refuse to continue if the polynomials are incorrect.
|
||
|
|
|
||
|
|
- Check the backup snapshots
|
||
|
|
|
||
|
|
Backup manager will test that all hosts are properly configured in it's configuration file.
|
||
|
|
Ensure the hosts are properly configured.
|
||
|
|
|
||
|
|
- Copy backups
|
||
|
|
|
||
|
|
If 2 repositories have the same host assigned, backup manager will make sure both of them have the latest
|
||
|
|
backup for that host present. If the newest backup on both repositories are not the same, it will copy
|
||
|
|
the newest version to the other repository
|
||
|
|
|
||
|
|
- Verify backups
|
||
|
|
|
||
|
|
If repository verification is turned on, the repository is verified to ensure it is sound.
|
||
|
|
A status file is kept - if we know the repository is in good state, we will check 5% of the repository
|
||
|
|
at most every 12 hours. If we don't know the repository is in good state from the status file, a full check
|
||
|
|
will be performed, so we are certain the backups are valid
|
||
|
|
|
||
|
|
|
||
|
|
- Cleaning out old backups
|
||
|
|
|
||
|
|
We use the status file to run this only once every 15 days: we will forget all old snapshots
|
||
|
|
according to the configuration file, and prune all files if more then 10% is stale.
|
||
|
|
|
||
|
|
|
||
|
|
## Configuration
|
||
|
|
|
||
|
|
To configure it, ensure the ppm configuration file is filled in. The configuration definition
|
||
|
|
can be read in appinfo.yml (This is still a todo to let ppm generate the documentation file for this config)
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|