diff options
Diffstat (limited to 'tarsnap/daily_tarsnap.pl')
| -rw-r--r-- | tarsnap/daily_tarsnap.pl | 9 |
1 files changed, 5 insertions, 4 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; |
