A simple backup script nobody asked for.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

backup.zsh.cfg 1.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #### general options ####
  2. ## The protocol we want to use to store our backups.
  3. ## Can be ftp, sftp, ftps, ssh or local.
  4. protocol='ssh'
  5. ## The directory to store backups in, locally or remotely.
  6. backup_dir='relative_or_full_path'
  7. ## The list of patterns to exclude from backups, for
  8. ## more details look into tar -X option.
  9. #exclude_list='/usr/local/etc/backup/excludes.list'
  10. ## The compression algorithm for backups.
  11. ## Can be gz, bz2, xz or empty (for non-compressed).
  12. compress_format='xz'
  13. ## An array with the set of directories within it.
  14. ## Optionally snapshot file can be added to store
  15. ## incremental diffs (tar -g option used).
  16. ## You'll have to deal with snapshots on your own:
  17. ## backup.zsh only handles backups (i.e. you can remove
  18. ## snapshot via cron on regular basis to ensure that
  19. ## full backups are created from time to time.)
  20. source_dirs=( '/home/user/source1:/var/backup/snapshot.list'
  21. '/etc' '/var/spool/mail:/var/backup/spool_snapshot.list' )
  22. ## Use with caution, the file existance is not checked
  23. ## on execution.
  24. ## Since this config is sourced, I advise adding some
  25. ## logic for that, or you can handle filename collisions
  26. ## externally.
  27. #backup_filename='somebackup'
  28. ## GPG key to encrypt backups, uses name of the private
  29. ## key in your keyring. It is also entirely possible to
  30. ## add the GNUPGHOME environment variable export here in
  31. ## order to use the private key from a specific location.
  32. #gnupg_key='keyname'
  33. #### remote options ####
  34. ## Remote host.
  35. remote_host='hostname.tld'
  36. ## Remote user.
  37. remote_user='username'
  38. ## Password, due to how openssh handles security it only
  39. ## works for *ftp* protocols; backups via ssh protocol
  40. ## work interactively. Later versions will have support
  41. ## for ssh keys... If I ever decide to make it happen.
  42. remote_pass='PassWd'
  43. ## Port is optional, the defaults are hardcoded.
  44. #remote_port='443'
  45. # vim: ft=zsh