Skip to content

Commit

Permalink
Added bzip2 to log propagation backups
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Lindsey committed Jul 19, 2024
1 parent ef4a026 commit 1301fc2
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions files/root/cron_scripts/krb5_sm_backup.pl
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@
$tofile_cur = $backupdir.$data.".current";
$dest = $backupdir;

if((-e $file) && (-e $dest)){
system("cp $file $tofile");
system("cp $tofile $tofile_cur");
}else{
print "krb5_sm_backup failed\n";
if (( -e $file ) && ( -e $dest )) {
system("cp $file $tofile");
system("cp -f $tofile $tofile_cur");
system(qq(bzip2 -9vs $tofile));
} else{
print "krb5_sm_backup failed\n";
}

0 comments on commit 1301fc2

Please sign in to comment.