diff --git a/docs/30_Configuration/_index.md b/docs/30_Configuration/10_Initialisation.md similarity index 100% rename from docs/30_Configuration/_index.md rename to docs/30_Configuration/10_Initialisation.md diff --git a/docs/30_Configuration/10_Database.md b/docs/30_Configuration/20_Database.md similarity index 100% rename from docs/30_Configuration/10_Database.md rename to docs/30_Configuration/20_Database.md diff --git a/docs/30_Configuration/20_Filetransfer.md b/docs/30_Configuration/20_Filetransfer.md deleted file mode 100644 index e8b4b98f2694868b0111acbbb9cc6fb0415e9995..0000000000000000000000000000000000000000 --- a/docs/30_Configuration/20_Filetransfer.md +++ /dev/null @@ -1,84 +0,0 @@ -The file transfer describes how local directories will be backed up - -* choose backup tool -* where to write data (backup target) -* incremental or full backup -* how to delete backup data - -Details to the the given config entries you find in the description for -[transfer.job](50_File_transfer.job.md). - -## Backup tool ## - -You can decide between Restic (Default) and Duplicity. - -`bin = ...` - -```text -bin = restic -type = auto -``` - -If you use Duplicity for servers it is suggested to run (daily) incremental -backups and full backups on a specific day. - -```text -bin = duplicity -type = inc -full = WDM:3rd Fri -start-time-full = 23:0. -``` - -If you use Duplicity on a desktop client you maybe want to run incremental backups -and a full backup if the last one is older than a wanted time. - -```text -bin = duplicity -type = auto -auto = 1M -``` - -## Backup target ## - -The definition of a backup target depends on the used backup tool (restic|duplicity). -You need a bit knowledge about these tools. - -We have tested the following targets - -* local directory/ mounted filesystem i.e. Samba share - * Restic: `/mnt/mounted_directory` - * Duplicity: `file:///mnt/mounted_directory` -* ssh target (scp or rsync) - * Restic: `sftp:imlbackup@backup-target.example.com:/mnt/backupdata` - * Duplicity: `rsync://imlbackup@backup-target.example.com//mnt/backupdata` - * Duplicity: `scp://imlbackup@backup-target.example.com//mnt/backupdata` -* https - * Restic: `rest:https://user:pass@backup-target.example.com:8000/user/` - -Set your value in `storage = ...` - -Example for Restic with SFTP transfer - -`storage = sftp:imlbackup@backup-target.example.com:/mnt/backupdata` - -## Local encryption ## - -Restic an Duplicity encrypt local data with a password before transferring them. - -Deploy a host specific password with an orchestration tool (Ansible, Puppet, ...) -or on a manual installation keep a copy of it on a safe place. Without the password -you cannot decrypt backup data after a filesystem crash. - -`passphrase = EnterYourSecretHere` - -## More options ## - -Automatic backup of samba shares - it works only if samba shares were detected. -If no samba config is available it has no effect and shows no error. - -`sambashares = 1` - -When restoring data ... this is the path for restored files: - -`restore-path = /restore` - diff --git a/docs/30_Configuration/30_Filetransfer.md b/docs/30_Configuration/30_Filetransfer.md new file mode 100644 index 0000000000000000000000000000000000000000..69022067ae806ca187d2868c4033e908358fdceb --- /dev/null +++ b/docs/30_Configuration/30_Filetransfer.md @@ -0,0 +1,177 @@ +The file transfer describes how local directories will be backed up + +* choose backup tool; incremental or full backup +* where to write data (backup target) +* set password for local encryption +* more options +* how to cleanup old backup data + +Details to the the given config entries you find in the description for +[transfer.job](50_File_transfer.job.md). + +## Backup tool ## + +You can decide between Restic (Default) and Duplicity. + +`bin = ...` + +```text +bin = restic +type = auto +``` + +If you use Duplicity for servers it is suggested to run (daily) incremental +backups and full backups on a specific day. + +```text +bin = duplicity +type = inc +full = WDM:3rd Fri +start-time-full = 23:0. +``` + +If you use Duplicity on a desktop client you maybe want to run incremental backups +and a full backup if the last one is older than a wanted time. + +```text +bin = duplicity +type = auto +auto = 1M +``` + +## Backup target ## + +The definition of a backup target depends on the used backup tool (restic|duplicity). +You need a bit knowledge about these tools. + +We have tested the following targets + +* local directory/ mounted filesystem i.e. Samba share + * Restic: `/mnt/mounted_directory` + * Duplicity: `file:///mnt/mounted_directory` +* ssh target (scp or rsync) + * Restic: `sftp:imlbackup@backup-target.example.com:/mnt/backupdata` + * Duplicity: `rsync://imlbackup@backup-target.example.com//mnt/backupdata` + * Duplicity: `scp://imlbackup@backup-target.example.com//mnt/backupdata` +* https + * Restic: `rest:https://user:pass@backup-target.example.com:8000/user/` + +Set your value in `storage = ...` + +Example for Restic with SFTP transfer + +`storage = sftp:imlbackup@backup-target.example.com:/mnt/backupdata` + +## Local encryption ## + +Restic an Duplicity encrypt local data with a password before transferring them. + +Deploy a host specific password with an orchestration tool (Ansible, Puppet, ...) +or on a manual installation keep a copy of it on a safe place. Without the password +you cannot decrypt backup data after a filesystem crash. + +`passphrase = EnterYourSecretHere` + +## More options ## + +Automatic backup of samba shares - it works only if samba shares were detected. +If no samba config is available it has no effect and shows no error. + +`sambashares = 1` + +When restoring data ... this is the path for restored files: + +`restore-path = /restore` + +### Duplicity settings ### + +When writing backup data duplicity creates the target file and a index. +By default the index is written to ~/.cache/duplicity/ (and to the backup target). +If your /root partition has a limited size and/ or you have a lot of files +(i.e. on a file server) then you can put the index files somewhere else: + +`duplicity_cachedir = [full path]` + +Duplicity with rsync needed an additional ssh-backend *pexpect* on Debian. +It can be set with enabling: + +`# duplicity_ssh-backend = pexpect` + +On the backup target you can define the size of the chunks to write. +This would allow to write the backup data to an additional medium with +limited size (i.e. CD or DVD). + +Set a size in MB + +`duplicity_volsize = 350` + +### Restic settings ### + +When writing backup data restic creates a local index. +By default the index is written to ~/.cache/restic/. +If your /root partition has a limited size and/ or you have a lot of files +(i.e. on a file server) then you can put the index files somewhere else: + +`restic_cachedir = [full path]` + +The default verbose of IML backup for restic is 2. During file transfer +this shows unchanged/ new/ deleted files. Change it to a less value +to generate less log data. + +`restic_verbose = 2` + +A file transfer can be tagged. Each restic backup gets a defined tag + +`restic_tag = imlbackup` + +For restore you can copy files to the restore location. With restic +you can mount the backup volume into the local filesystem using fuse. +Then you can browse in the snapshots of the backup data and copy +the files and dirs with linux commands. + +The mountpoint for the backup storage is a full path (it will be created +when selcting to mount in the restore). + +`restic_mountpoint = /mnt/restore` + +## Cleanup options ## + +### Duplicity ### + +Duplicity can set a value how long to keep backup data on the backup storage. +It will keep all files of incremental and full backup to be able to restore +data of the given min. availability. + +Example if you defined a monthly full backup and keep backups for 6 monthes ... +then it keeps all files up to 6 monthes plus all older files up to the next +full backup. You will find backup files up to 7 monthes. + +```text + 1 month (for monthly full backup) ++ 6 monthes (min. availability for restore) +--------------------------------------------- + 7 monthes +``` + +The value duplicity_keep is a number and a letter for the time format. + +s, m, h, D, W, M, or Y (indicating seconds, minutes, hours, days, weeks, months, or years respectively) + +`duplicity_keep = 6M` + +### Restic ### + +Restic works like a repository and uses deduplication. The first run of a file backup +is a full backup and all following runs make an incremental backup. + +You have the possibility to keep all younger backups and have the possibility to delete +older backups but to keep N weekly, monthly and yearly snapshots. + +```text +# prune +restic_keep-hourly = 100 +restic_keep-daily = 90 +restic_keep-weekly = 12 +restic_keep-monthly = 12 +restic_keep-yearly = 10 +```