[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Exclude patterns
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 29/06/14 14:04, jerry wrote:
> Damn I love Unix. Tarsnap doesn't do exclude files. I REALLY
> want exclude files. I like having the excludes enumerated as close
> as possible to the actual files. And that --nodump thing leaves
> me completely cold. An invisible flag that affects how things
> work? I don't think so. I always think about how the thing will
> work without protest for - oh, say - three years. Then it will
> break and I will have to fix it, and I won't remember what I did.
> So I really want those exclude files. Out in the open, right next
> to the files being backed up.
>
> Getting back to loving Unix: I wrote a quickie wrapper for
> tarsnap in Perl. It goes and gets the excludes file from the top
> directory of the tree being backed up, and creates a tarsnap
> command line. Here it is:
>
[snipped perl code]
> So I have a file, /root/excludes, which consists of: --------------
> snip --------------------- # tarsnap excludes. Maybe works for
> rsync also? *~ # editor backup files
> .cpan/sources # cpan cruft .cpan/Metadata # more
> cpan cruft .cpan/build # when will the cpan madness
> end? -------------- endsnip -----------------------------
>
> I execute the command: ./etarsnap --dry-run -cvf root /root
>
> which generates and executes the following command:
>
> /usr/local/bin/tarsnap --exclude /root/.cpan/build --exclude
> /root/.cpan/Metadata --exclude /root/.cpan/sources --exclude *~
> --dry-run -cvf root /root
>
Jerry, this looks good (though I am also not a perl programmer).
But how is maintaining a list of paths/files to be excluded in
/root/excludes different to maintaining a similar list in
/usr/local/etc/tarsnap.conf ?
Bob
- --
Bob Williams
System: Linux 3.11.10-17-desktop
Distro: openSUSE 13.1 (x86_64) with KDE Development Platform: 4.13.2
Uptime: 06:00am up 20:14, 4 users, load average: 0.13, 0.12, 0.13
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlOwJzQACgkQ0Sr7eZJrmU79agCeMOVybeH2OnzcBzjOtHlp4si7
BGgAn3StVtufZIaVAIra0yd59Mv/IU7k
=+pBD
-----END PGP SIGNATURE-----