backup-container: add excludes

This commit is contained in:
Jörg Thalheim 2016-01-09 10:08:27 +00:00
parent 7e89d0202b
commit c40da17466
1 changed files with 5 additions and 1 deletions

View File

@ -96,7 +96,11 @@ end
env = { "ATTIC_PASSPHRASE" => File.read(PASSWORD_FILE).chomp }
now = Time.now.strftime("%Y-%m-%d-%H:%M:%S")
paths = backup_paths.map {|path| path.to_s }
sh("attic", env, "create", "--stats", "#{BACKUP_PATH}::eve-#{now}", *paths)
sh("attic", env, "create", "--stats", "#{BACKUP_PATH}::eve-#{now}",
'--exclude', '*/srv/repo',
'--exclude', '*/home/joerg/git',
'--exclude', '*/home/joerg/login/git',
*paths)
sh("attic", env, "prune", "-v", BACKUP_PATH,
"--keep-daily", KEEP_DAILY.to_s,
"--keep-weekly", KEEP_WEEKLY.to_s,