[NBLUG/talk] UNIX System V backup woes

gandalf at sonic.net gandalf at sonic.net
Mon Oct 26 15:50:59 PDT 2015


The problem is actually mostly solved now. I just did single directory 
tars and just copied the large database directories to the other system 
(a win server).

These ideas looked promising so I tried them:

# cd / ; tar cf - $(ls | grep -v backup) | split -b1073741824 - 
/backup/backup.tar.
syntax error: `(' unexpected
#

Wrong shell perhaps? This system drives me buggy. The keys don't map 
properly in ssh so backspace and delete never seem to work right. You 
have to type a line exactly with no mistakes or scrap it and start over. 
I once went through and tried all the terminal options with no better 
results.

The basic tar with the split does work but immediately starts backing up 
itself and proc and other odd folders.

I would like to try the ssh one but I don't have access to any other 
linux/unix servers on that site.

In any event I think I may have it solved. They may want me to script 
the download of the backup through WinSCP but that's about it. They seem 
really pleased to be able to copy files using WinSCP.

On 2015-10-26 13:44, Eric Eisenhart wrote:
> 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 [1]
> 
> 
> Links:
> ------
> [1] http://nblug.org/cgi-bin/mailman/listinfo/talk
> 
> _______________________________________________
> talk mailing list
> talk at nblug.org
> http://nblug.org/cgi-bin/mailman/listinfo/talk


More information about the talk mailing list