BackupPC-users

Re: [BackupPC-users] BackupPC_tarCreate with only certain types of files

2015-05-23 08:43:08
Subject: Re: [BackupPC-users] BackupPC_tarCreate with only certain types of files
From: Timothy J Massey <tmassey AT obscorp DOT com>
To: "Holger Parplies" <wbppc AT parplies DOT de>
Date: Sat, 23 May 2015 08:40:21 -0400
Thank you very much for the confirmation that I'm not crazy and you can't
do wildcards with BackupPC_tarCreate.

In this instance, I was able to come up with enough free space to be able
to do the complete restore and then grab the data I needed from that. But
thank you very much for your code: I will experiment with it is a need to
use it in the future.

Timothy J. Massey

Sent from my iPad

> On May 23, 2015, at 7:43 AM, Holger Parplies <wbppc AT parplies DOT de> wrote:
>
> Hi,
>
> Timothy J Massey wrote on 2015-05-22 20:40:52 -0400 [Re: [BackupPC-users]
BackupPC_tarCreate with only certain types of?files]:
> > Les Mikesell <lesmikesell AT gmail DOT com> wrote on 05/22/2015 04:24:56 PM:
> >
> > > > What am I missing?  How do I get BackupPC_tarCreate to create a
> > > > tar file that contains all PDF's stored in that path?
> > > > [...]
> > >
> > > Can't help with BackupPC_tarCreate's wildcard concepts
>
> I can: there are none. BackupPC_tarCreate gets a list of path names to
include
> in the tar. Each of these is looked up verbatim and included (with
> substructure if it happens to be a directory).
>
> > The problem is not that I couldn't figure out how to get the PDF's at
all,
> > but how I could avoid restoring 500GB of data for the 500*MB* I
actually
> > need!  :)
>
> It should be *fairly* simple to patch BackupPC_tarCreate for the simple
case
> you need. A more general case would add an option and include correct
handling
> of hardlinks and symlinks. In sub TarWriteFile, after the calculation of
> $tarPath and before the big file type "if" (line 455 in the 3.3.0
source),
> I'd add
>
>       return
>         if $hdr->{type} != BPC_FTYPE_DIR and $tarPath !~ /\.pdf$/i;
>
> (omit the "i" modifier if you really only mean lowercase "pdf"). Note
that
> this is once again completely untested ;-).
>
> Hope that helps.
>
> Regards,
> Holger


------------------------------------------------------------------------------
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/