diff options
| author | Brad Clawsie <brad@b7j0c.org> | 2023-07-08 14:20:49 -0500 |
|---|---|---|
| committer | Brad Clawsie <brad@b7j0c.org> | 2023-07-08 14:20:49 -0500 |
| commit | e5d839026413db10d40380fad573966789ed4f16 (patch) | |
| tree | f2aca0e5a4915af232114c19ec046bdce011d324 | |
| parent | 8b747028533b48bf37a8a937329c4ef2cb20e026 (diff) | |
tarsnap
| -rw-r--r-- | tarsnap/daily_tarsnap.pl | 7 | ||||
| -rw-r--r-- | tarsnap/delete_tarsnap.pl | 5 |
2 files changed, 3 insertions, 9 deletions
diff --git a/tarsnap/daily_tarsnap.pl b/tarsnap/daily_tarsnap.pl index c449b3a..5591d9c 100644 --- a/tarsnap/daily_tarsnap.pl +++ b/tarsnap/daily_tarsnap.pl @@ -3,19 +3,16 @@ use v5.36; use strict; use DateTime; -my $ip_out = `ip -4 addr show`; -die 'not actual b7j0c.org; not running' unless ($ip_out =~ /inet 149.28.248.5/); - my $dt = DateTime->now(); $dt->set_time_zone('America/Chicago'); -my $prefix = 'b7j0c_'; +my $prefix = 'arch_'; 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 $list_archives = `$tarsnap --list-archives`; -my $backup_paths = '/home /usr/local/www'; +my $backup_paths = '/home'; my $excludes = ''; chomp($list_archives); my @archives = split(/\n/,$list_archives); diff --git a/tarsnap/delete_tarsnap.pl b/tarsnap/delete_tarsnap.pl index e9d6493..86f89fa 100644 --- a/tarsnap/delete_tarsnap.pl +++ b/tarsnap/delete_tarsnap.pl @@ -3,12 +3,9 @@ use v5.36; use strict; use DateTime; -my $ip_out = `ip -4 addr show`; -die 'not actual b7j0c.org; not running' unless ($ip_out =~ /inet 149.28.248.5/); - my $dt = DateTime->now(); $dt->set_time_zone('America/Chicago'); -my $prefix = 'b7j0c_'; +my $prefix = 'arch_'; my $prefix_yyyymmdd = $prefix . $dt->ymd(''); my $prefix_reserve_yyyymmdd = $prefix . $dt->subtract('days'=>1)->ymd(''); say "today:\t\t" . $prefix_yyyymmdd; |
