more refactoring and fixing, now fully functional and with a documented config
This commit is contained in:
parent
ffe5c9ac16
commit
0aabfe44bf
2 changed files with 102 additions and 49 deletions
57
backup.cfg
57
backup.cfg
|
@ -1,11 +1,50 @@
|
|||
protocol=ssh # ftp, sftp, ftps, ssh or local
|
||||
remote_host=hostname.tld
|
||||
backup_dir=relative_or_full_path
|
||||
#snap_file=/var/backup/snapshot.list
|
||||
#exclude_list=/usr/local/etc/backup/excludes.list
|
||||
compress_format=xz # gz, bz2, xz or empty for non-compressed
|
||||
remote_user=username
|
||||
remote_pass=PassWd
|
||||
source_dirs=( '/home/user/source1:/var/backup/snapshot.list' )
|
||||
#### general options ####
|
||||
## The protocol we want to use to store our backups.
|
||||
## Can be ftp, sftp, ftps, ssh or local.
|
||||
protocol='ssh'
|
||||
|
||||
## The directory store backups in, locally or remotely.
|
||||
backup_dir='relative_or_full_path'
|
||||
|
||||
## The list of patterns to exclude from backups, for
|
||||
## more details look into tar -X option.
|
||||
#exclude_list='/usr/local/etc/backup/excludes.list'
|
||||
|
||||
## The compression algorithm for backups.
|
||||
## Can be gz, bz2, xz or empty (for non-compressed).
|
||||
compress_format='xz'
|
||||
|
||||
## An array with the set of directories within it.
|
||||
## Optionally snapshot file can be added to store
|
||||
## incremental diffs (tar -g option used).
|
||||
## You'll have to deal with snapshots on your own:
|
||||
## backup.zsh only handles backups (i.e. you can remove
|
||||
## snapshot via cron on regular basis to ensure that
|
||||
## full backups are created from time to time.)
|
||||
source_dirs=( '/home/user/source1:/var/backup/snapshot.list'
|
||||
'/etc' '/var/spool/mail:/var/backup/spool_snapshot.list' )
|
||||
|
||||
## Use with caution, the file existance is not checked
|
||||
## on execution.
|
||||
## Since this config is sourced, I advise adding some
|
||||
## logic for that, or you can handle filename collisions
|
||||
## externally.
|
||||
#backup_filename='somebackup'
|
||||
|
||||
#### remote options ####
|
||||
## Remote host.
|
||||
remote_host='hostname.tld'
|
||||
|
||||
## Remote user.
|
||||
remote_user='username'
|
||||
|
||||
## Password, due to how openssh handles security it only
|
||||
## works for *ftp* protocols; backups via ssh protocol
|
||||
## work interactively. Later versions will have support
|
||||
## for ssh keys.
|
||||
remote_pass='PassWd'
|
||||
|
||||
## Port is optional, the defaults are hardcoded.
|
||||
#remote_port='443'
|
||||
|
||||
# vim: ft=zsh
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue