From b36e008a037b2135b2055034d089559e216a0b81 Mon Sep 17 00:00:00 2001 From: Brad Clawsie Date: Sun, 16 Jul 2023 18:20:53 -0500 Subject: tarsnap --- tarsnap/daily_tarsnap.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tarsnap') diff --git a/tarsnap/daily_tarsnap.pl b/tarsnap/daily_tarsnap.pl index 5591d9c..5b82e9d 100644 --- a/tarsnap/daily_tarsnap.pl +++ b/tarsnap/daily_tarsnap.pl @@ -10,10 +10,10 @@ my $prefix_yyyymmdd = $prefix . $dt->ymd(''); my $prefix_reserve_yyyymmdd = $prefix . $dt->subtract('days'=>1)->ymd(''); say "today:\t\t" . $prefix_yyyymmdd; say "yesterday:\t" . $prefix_reserve_yyyymmdd; -my $tarsnap = 'tarsnap --cachedir /root/tarsnap-cache --keyfile /root/tarsnap.key'; +my $tarsnap = 'tarsnap --cachedir=/root/tarsnap-cache --keyfile=/root/tarsnap.key'; my $list_archives = `$tarsnap --list-archives`; -my $backup_paths = '/home'; -my $excludes = ''; +my $backup_paths = '/home/brad/repos /home/brad/.ssh /home/brad/.gnupg /home/brad/.random /home/brad/.passage'; +my $excludes = '--exclude=/home/brad/repos/aur --exclude=target'; chomp($list_archives); my @archives = split(/\n/,$list_archives); my $make_yyyymmdd = 1; @@ -27,7 +27,7 @@ for my $archive (@archives) { my $tarsnap_cmd = ''; if (1 == $make_yyyymmdd) { say "make for today"; - my $yyyymmdd_cmd = $tarsnap . ' -c -f ' . $prefix_yyyymmdd . ' ' . $backup_paths . ' ' . $excludes; + my $yyyymmdd_cmd = $tarsnap . ' -c -f ' . $prefix_yyyymmdd . ' ' . $excludes . ' ' . $backup_paths; say $yyyymmdd_cmd; $tarsnap_cmd = $yyyymmdd_cmd . ';'; } -- cgit v1.2.3