diff options
| author | Brad Clawsie <brad@b7j0c.org> | 2023-07-07 18:23:21 -0500 |
|---|---|---|
| committer | Brad Clawsie <brad@b7j0c.org> | 2023-07-07 18:23:21 -0500 |
| commit | 8b747028533b48bf37a8a937329c4ef2cb20e026 (patch) | |
| tree | 29743570d694cef6edcd05ff75bdf3c658d37413 /tarsnap | |
| parent | 47b2ccc77eeeba85d6d27362eb47f250a1f69168 (diff) | |
update
Diffstat (limited to 'tarsnap')
| -rw-r--r-- | tarsnap/daily_tarsnap.pl | 9 | ||||
| -rw-r--r-- | tarsnap/delete_tarsnap.pl | 6 |
2 files changed, 8 insertions, 7 deletions
diff --git a/tarsnap/daily_tarsnap.pl b/tarsnap/daily_tarsnap.pl index 420c365..c449b3a 100644 --- a/tarsnap/daily_tarsnap.pl +++ b/tarsnap/daily_tarsnap.pl @@ -1,21 +1,21 @@ #!/usr/bin/env perl -use v5.32; +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 144.202.72.212/); +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 = 'b7j0cdebian_'; +my $prefix = 'b7j0c_'; 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 /var/www'; +my $backup_paths = '/home /usr/local/www'; my $excludes = ''; chomp($list_archives); my @archives = split(/\n/,$list_archives); @@ -36,4 +36,5 @@ if (1 == $make_yyyymmdd) { } say $tarsnap_cmd; system($tarsnap_cmd) if ($tarsnap_cmd ne ''); + 1; diff --git a/tarsnap/delete_tarsnap.pl b/tarsnap/delete_tarsnap.pl index 6199513..e9d6493 100644 --- a/tarsnap/delete_tarsnap.pl +++ b/tarsnap/delete_tarsnap.pl @@ -1,14 +1,14 @@ #!/usr/bin/env perl -use v5.32; +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 144.202.72.212/); +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 = 'b7j0cdebian_'; +my $prefix = 'b7j0c_'; my $prefix_yyyymmdd = $prefix . $dt->ymd(''); my $prefix_reserve_yyyymmdd = $prefix . $dt->subtract('days'=>1)->ymd(''); say "today:\t\t" . $prefix_yyyymmdd; |
