Matthias Meyer wrote at about 06:41:49 +0200 on Tuesday, April 9, 2019:
 > Am Sonntag 07 April 2019, 17:11:47 schrieb backu...@kosowsky.org:
 > > Sometimes you want to save a special backup that for example
 > > corresponds to a specific change (pre/post) on your system. The
 > > trouble is that with exponential deleting there is no way to
 > > guarantee that your specific designated backup won't be deleted
 > > automatically later on.
 > > 
 > > In the past, I have simply renamed the backup number to say <num>-save
 > > which prevents it from being deleted.
 > > But it also prevents the backup from being part of <host-name>/backups
 > > and thus being browsable from the web interface.
 > > 
 > > Ideally, it would be nice if one could prevent a specific backup from
 > > being deleted (or even being part of the exponential schema) by
 > > either:
 > > 1. Adding a designated "LOCK" file to the top director (just under the
 > > backun number)
 > > 2. Prefixing the entry in the <host-name>/backups file with a
 > > character that says essentially, skip over me for deleting purposes
 > > but otherwise I am still here.
 > > 
 > > Any suggestions better than my renaming of the backup tree itself?
 > > 
 > > Jeff
 > > 
 > > 
 > > _______________________________________________
 > > BackupPC-users mailing list
 > > BackupPC-users@lists.sourceforge.net
 > > List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
 > > Wiki:    http://backuppc.wiki.sourceforge.net
 > > Project: http://backuppc.sourceforge.net/
 > 
 > You could use my patch 
 > ftp://www.backup4u.at/BackupPC-V3.3.2-FullCntYearly.patch and rewrite it to 
 > skip directories containing such a file instead or in addition to the first 
 > full of a year.
 > 
 > Br
 > Matthias
 > 
 > PS: user/password = ftpuser/Backup4U4FTP
 > 

The following simple patch worked for me:

--- BackupPC_dump.jnew.~1~      2019-04-29 23:07:13.903654687 -0400
+++ BackupPC_dump.jnew  2019-04-30 01:36:15.788988030 -0400
@@ -1842,6 +1842,9 @@
         my $noDelete = $i + 1 < @$Backups ? $Backups->[$i+1]{noFill} : 0;
         $noDelete = 0 if ( !$Backups[$i]{preV4} );

+       #Don't delete full backups that have 'JJKSave' in their root directory
+       $noDelete = 1 if -e $Dir . "/" . $Backups[$i]{num} . "/JJKSave";
+
         if ( !$noDelete &&
               ($fullKeepIdx >= @$fullKeepCnt
               || $k > 0


_______________________________________________
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

Reply via email to