[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mixing include and exclude patterns in tarsnap.conf



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jamie,

Once again, thanks for your in-depth knowledge.

I'll have a play with the --nodump option. Looks interesting.

Bob

On 21/06/14 19:09, Jamie Landeg-Jones wrote:
> Bob Williams <linux@barrowhillfarm.org.uk> wrote:
> 
>> If I remove all those include directives, then it runs as I
>> expect, lots of lines beginning with 'a', and apparently backing
>> up all the non-excluded stuff in /home/bob (which is what I want)
>> and the whole of /etc (which I don't want). I could add exclude
>> lines for everything in /etc *except* those include lines above,
>> but that seems inefficient, and begs the question "what are the
>> include patterns for?"
> 
> Bob, I don't have an answer to your specific question - I don't
> really use those options.
> 
> However, have you considered using the nodump flag? I use this,
> and feel it's neater. It's more fine grained, and I can tell from
> an ls -ol which files are backed up or not without having to search
> through conf files. (though of course, a nodump on a directory also
> covers everything below is, so files/directories don't necessarily
> need nodump directly)
> 
> So, to use your above case as an example, add option '--nodump' to 
> the tarsnap command, after first doing:
> 
> BSD: chflags -R nodump /etc chflags -R dump /etc/crontab /etc/fstab
> /etc/HOSTNAME /etc/hosts /etc/mdadm.conf /etc/mpd.conf /etc/sudoers
> /etc/vimrc /etc/ssh ls -lao (To view)
> 
> Linux: (I think) chattr -R +d /etc chattr -dR /etc/crontab
> /etc/fstab /etc/HOSTNAME /etc/hosts /etc/mdadm.conf /etc/mpd.conf
> /etc/sudoers /etc/vimrc /etc/ssh lsattr (To view)
> 
> (The second -R is needed in this case to make sure everything
> under /etc/ssh/ is made dumpable - as we've previously just marked
> every file/directory as nodump)
> 
> You can even put the above in your script before running tarsnap if
> you want to ensure the flags are as you expect at backup time (e.g.
> nothing missed due to a file being deleted and replaced etc. and
> the dump flag lost or undeterminable)
> 
> Finally, as I mentioned, 'nodump' on directories covers everything
> below it, so if (say) you wanted to backup everything under /var
> except /var/tmp setting the nodump flag only on /var/tmp and
> backing up /var would surfice.
> 
> I know this doesn't specifically answer your question, but it's
> another way to approach things!
> 
> Cheers, Jamie
> 


- -- 
Bob Williams
System:  Linux 3.11.10-11-desktop
Distro:  openSUSE 13.1 (x86_64) with KDE Development Platform: 4.13.2
Uptime:  06:00am up 13 days 11:36, 3 users, load average: 0.07, 0.06, 0.05
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlOl89EACgkQ0Sr7eZJrmU5gZQCgjjHypRWxKM9WdM5qL/pVnBRX
CioAniqzy6mpOlFu83xiO6d2OuwYA48u
=TN7D
-----END PGP SIGNATURE-----