~rgrjr/rgrjr-scripts

4f4418a583b5047c0d658a47ceb4f189d3ce1002 — Bob Rogers 2 months ago f125cf0
Add MariaDB database backup file syntax

* Backup/DumpSet.pm:
   + (_parse_file_name):  Also accept file names of the form
     "pfx-######-####.dump.gz" as backups to be copied, so we can
     include database backups in the usual DB backup style.
1 files changed, 5 insertions(+), 0 deletions(-)

M Backup/DumpSet.pm
M Backup/DumpSet.pm => Backup/DumpSet.pm +5 -0
@@ 94,6 94,11 @@ sub _parse_file_name {
	my $index = $alpha_index ? ord($alpha_index)-ord('a')+1 : 0;
	return ($pfx, $date, $level, $index, 0, $file_name, $size);
    }
    elsif ($file_name =~ m@([^/]+)-(\d{6,8}-\d{4})\.dump(\.gz)?$@) {
	# database backup.
	my ($pfx, $date_time) = $file_name =~ //;
	return ($pfx, $date_time, 0, 1, 0, $file_name, $size);
    }
    elsif ($file_name =~ m@([^/]+)-(\d+)-l(\d)(-cat)?\.(\d+)\.dar$@) {
	# DAR format.
	my ($pfx, $date, $level, $cat_p, $index) = $file_name =~ //;