[NBLUG/talk] UNIX System V backup woes

Eric Eisenhart eric at nblug.org
Mon Oct 26 13:44:11 PDT 2015


Does this version of tar have any way to exclude a directory?
"--exclude=/backup/*" or "-X=file-with-excludes.txt"?

If not, you could do something like "cd / ; tar cvf /backup/backup.tar $(ls
| grep -v backup)" to pull all the things in / except for things matching
"backup". This really only works if your / directory doesn't have any weird
filenames or hidden things. (or "-A" on the ls would work for hidden
things, if this ls has that option)

To split the tar up into 1GB chunks without using fancy new tar options,
you can do:
tar cf - / | split -b1073741824 - /backup/backup.tar.

To combine all those:
cd / ; tar cf - $(ls | grep -v backup) | split -b1073741824 -
/backup/backup.tar.

To do a restore with the split up tar, you'd need to do something like:
cat /backup/backup.tar.* | tar xvf - /path/to/restore

Or, even better, just use a pipe and ssh to push the backup onto another
box (that supports large files) without writing to the local disk at all:
tar cf - / | ssh some-other-host dd of=/backup/firsthost.backup.tar


On Fri, Oct 23, 2015 at 1:16 PM <gandalf at sonic.net> wrote:

> That's an interesting idea. The client system probably doesn't even have
> to have rsync on it, but as the server system would be Win I don't think
> it would preserve file permissions.
>
> On 2015-10-23 13:05, Bill Kendrick wrote:
> > On Fri, Oct 23, 2015 at 10:04:03AM -0700, gandalf at sonic.net wrote:
> >> I'm trying to create a backup process for this system and it has an
> >> antiquated version of tar. I tried:
> > <snip>
> >> Also going to look into scripting WinSCP as it can connect and pull of
> >> files for backup to one of the win servers.
> >
> > Why not rsync?
> _______________________________________________
> talk mailing list
> talk at nblug.org
> http://nblug.org/cgi-bin/mailman/listinfo/talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nblug.org/pipermail/talk/attachments/20151026/daaf8842/attachment.html>


More information about the talk mailing list