backup-container: add excludes

This commit is contained in:
Jörg Thalheim 2016-01-09 10:08:27 +00:00
parent 7e89d0202b
commit c40da17466

View File

@ -96,7 +96,11 @@ end
env = { "ATTIC_PASSPHRASE" => File.read(PASSWORD_FILE).chomp } env = { "ATTIC_PASSPHRASE" => File.read(PASSWORD_FILE).chomp }
now = Time.now.strftime("%Y-%m-%d-%H:%M:%S") now = Time.now.strftime("%Y-%m-%d-%H:%M:%S")
paths = backup_paths.map {|path| path.to_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, sh("attic", env, "prune", "-v", BACKUP_PATH,
"--keep-daily", KEEP_DAILY.to_s, "--keep-daily", KEEP_DAILY.to_s,
"--keep-weekly", KEEP_WEEKLY.to_s, "--keep-weekly", KEEP_WEEKLY.to_s,