Re: [BackupPC-users] Manual delete script
2015-05-07 16:13:42
Holger Parplies wrote at about 21:24:33 +0200 on Thursday, May 7, 2015:
> Hi,
>
> Gerald Brandt wrote on 2015-05-07 12:54:51 -0500 [Re: [BackupPC-users]
> Manual delete script]:
> > Sorry. I'm trying to delete specific backups. Some older fulls that I
> > don't need anymore. If I recall, the script took the computer name and
> > the backup number as arguments, and deleted the files and updated
> > anything else it needed to.
>
> I believe 'rm' will get you most of the way. It sort of takes the computer
> name and backup number as arguments, too:
>
> rm -r $TopDir/pc/hostname/num
>
> It doesn't check dependencies, though, so it will mess up any incremental
> backups still depending on the backup you are removing. It will also leave
> the
> line for the backup in the backups file, so BackupPC might still show the
> backup in the web interface (I'm not sure whether it checks for the directory
> or not). This is easy to fix in a text editor. It also won't remove the
> corresponding backup log file. Again: rm.
>
> If I remember correctly, the script you were referring to went to some
> trouble
> to handle backup dependencies correctly, as well as delete individual *files*
> from one or more backups, including fixing the attrib files, which is far
> more
> difficult. It sounds as if you don't need all of that.
>
I believe there are actually 2 scripts.
One (which I did not write though I made some small edits to it) is called
BackupPC_deleteBackups that is a relatively simple Bash
shell script that does a little more than just "rm -rf" the backups. I
believe it:
- mv's them to the Backuppc trash folder to allow more graceful
deleting
- Allows backing up of a range of backups
- Makes sure you don't delete a backup that has a backup
dependency
- Cuts the corresponding backup info file line from the 'backup'
file at the root of the host backup.
- Deletes the backup-specific log files
- And optionally (laugh now) runs BackupPC_nightly
afterwards... but it probably does it wrong by calling the
procedure directly rather than using server message..
The other is the one Holger references which I wrote and is a
relatively complicated Perl script that handles deletions/insertions
and their dependencies at the individual file level. It is called
BackupPC_deleteFile.pl and is used to delete one or more files (or
directories) from one or more backups, while being sure not to change
incremental backup dependencies -- it requires delicate "surgery" on
the attrib files of both the selected backup(s) and their various
antecedents and dependents.
I suppose this second version could be used to delete entire shares
but it would be just a glorified Perl version of rm -rf <share
name>... and it wouldn't delete the log files
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/
|
|
|