<div dir="ltr">Use backticks ("tar cf - `ls | grep -v backup` | ...") instead of $(), then. I guess $() is too new for that box, but `` has been around for a very long time.<div><br></div><div>If you're ssh'ing into the system from a modern unix system, you could do "ssh root@OLDSERVER tar cf - / | dd of=/backup/oldserver-backup.tar" to get the tar locally...</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Oct 26, 2015 at 3:51 PM <<a href="mailto:gandalf@sonic.net">gandalf@sonic.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The problem is actually mostly solved now. I just did single directory<br>
tars and just copied the large database directories to the other system<br>
(a win server).<br>
<br>
These ideas looked promising so I tried them:<br>
<br>
# cd / ; tar cf - $(ls | grep -v backup) | split -b1073741824 -<br>
/backup/backup.tar.<br>
syntax error: `(' unexpected<br>
#<br>
<br>
Wrong shell perhaps? This system drives me buggy. The keys don't map<br>
properly in ssh so backspace and delete never seem to work right. You<br>
have to type a line exactly with no mistakes or scrap it and start over.<br>
I once went through and tried all the terminal options with no better<br>
results.<br>
<br>
The basic tar with the split does work but immediately starts backing up<br>
itself and proc and other odd folders.<br>
<br>
I would like to try the ssh one but I don't have access to any other<br>
linux/unix servers on that site.<br>
<br>
In any event I think I may have it solved. They may want me to script<br>
the download of the backup through WinSCP but that's about it. They seem<br>
really pleased to be able to copy files using WinSCP.<br>
<br>
On 2015-10-26 13:44, Eric Eisenhart wrote:<br>
> Does this version of tar have any way to exclude a directory?<br>
> "--exclude=/backup/*" or "-X=file-with-excludes.txt"?<br>
><br>
> If not, you could do something like "cd / ; tar cvf /backup/backup.tar<br>
> $(ls | grep -v backup)" to pull all the things in / except for things<br>
> matching "backup". This really only works if your / directory doesn't<br>
> have any weird filenames or hidden things. (or "-A" on the ls would<br>
> work for hidden things, if this ls has that option)<br>
><br>
> To split the tar up into 1GB chunks without using fancy new tar<br>
> options, you can do:<br>
> tar cf - / | split -b1073741824 - /backup/backup.tar.<br>
><br>
> To combine all those:<br>
> cd / ; tar cf - $(ls | grep -v backup) | split -b1073741824 -<br>
> /backup/backup.tar.<br>
><br>
> To do a restore with the split up tar, you'd need to do something<br>
> like:<br>
> cat /backup/backup.tar.* | tar xvf - /path/to/restore<br>
><br>
> Or, even better, just use a pipe and ssh to push the backup onto<br>
> another box (that supports large files) without writing to the local<br>
> disk at all:<br>
> tar cf - / | ssh some-other-host dd of=/backup/firsthost.backup.tar<br>
><br>
> On Fri, Oct 23, 2015 at 1:16 PM <<a href="mailto:gandalf@sonic.net" target="_blank">gandalf@sonic.net</a>> wrote:<br>
><br>
>> That's an interesting idea. The client system probably doesn't even<br>
>> have<br>
>> to have rsync on it, but as the server system would be Win I don't<br>
>> think<br>
>> it would preserve file permissions.<br>
>><br>
>> On 2015-10-23 13:05, Bill Kendrick wrote:<br>
>>> On Fri, Oct 23, 2015 at 10:04:03AM -0700, <a href="mailto:gandalf@sonic.net" target="_blank">gandalf@sonic.net</a><br>
>> wrote:<br>
>>>> I'm trying to create a backup process for this system and it has<br>
>> an<br>
>>>> antiquated version of tar. I tried:<br>
>>> <snip><br>
>>>> Also going to look into scripting WinSCP as it can connect and<br>
>> pull of<br>
>>>> files for backup to one of the win servers.<br>
>>><br>
>>> Why not rsync?<br>
>> _______________________________________________<br>
>> talk mailing list<br>
>> <a href="mailto:talk@nblug.org" target="_blank">talk@nblug.org</a><br>
>> <a href="http://nblug.org/cgi-bin/mailman/listinfo/talk" rel="noreferrer" target="_blank">http://nblug.org/cgi-bin/mailman/listinfo/talk</a> [1]<br>
><br>
><br>
> Links:<br>
> ------<br>
> [1] <a href="http://nblug.org/cgi-bin/mailman/listinfo/talk" rel="noreferrer" target="_blank">http://nblug.org/cgi-bin/mailman/listinfo/talk</a><br>
><br>
> _______________________________________________<br>
> talk mailing list<br>
> <a href="mailto:talk@nblug.org" target="_blank">talk@nblug.org</a><br>
> <a href="http://nblug.org/cgi-bin/mailman/listinfo/talk" rel="noreferrer" target="_blank">http://nblug.org/cgi-bin/mailman/listinfo/talk</a><br>
_______________________________________________<br>
talk mailing list<br>
<a href="mailto:talk@nblug.org" target="_blank">talk@nblug.org</a><br>
<a href="http://nblug.org/cgi-bin/mailman/listinfo/talk" rel="noreferrer" target="_blank">http://nblug.org/cgi-bin/mailman/listinfo/talk</a><br>
</blockquote></div>