Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TAR backup of many files to remote tape

Status
Not open for further replies.

hugonovo

MIS
Jul 21, 2003
53
PT
Hello all!

I'm having a problem on doing a backup with tar including 5 file-systems. The steps are:

1. Create the include file with all files of the 5 file-systems. (OK)
2. execution of tar command:
tar cvf - -I <include> | rsh <host> dd of=/dev/rmt/<device> obs=512k

...it gives error because it list all files and not the ones on include file.

Does anyone has any idea of this error, or workaround??

Thank you in advance,
Hugo Novo
Unix and Oracle Administrator
 
At first glance isn't your command:

tar cvf - -I <include>

cancelling the -I because of the first -?
 
the suggestion in 'man tar' would be the equivalent of:
Code:
tar cvfb - 20 -I <include> | rsh <host> dd of=/dev/rmt/<device> obs=20b

Jon
 
Don't you have to do


(tar yada yada yada ) | rsh yada yada yada.


Note the brackets on the TAR bit.

 
nope, you only need brackets if you have the output of more than 1 command combined.

Code:
(echo hello ; echo squiggle ; echo hello) | sort -u
 
Hugo,
Your command looks OK to me. When you say it gives error, what error does it give?

 
Instead of reading the include_file, it reads all files from / (root) - perhaps is a bug!!!.

Did you execute the command?

tar cvf - -I <include> | rsh <host> dd of=/dev/rmt/<device> obs=512k

Regards,
Hugo
 
Have you replaced <include> with the filename of the include file, without the &quot;<&quot; and &quot;>&quot; characters.

You probably have, but I'm just making sure!!

Annihilannic.
 
What is in the include file? Do you have &quot;/&quot; or &quot;.&quot; or wildcards ('*', '?') that might include all files in the root directory?
 
I just tried this out here and it worked OK for me.


Even with the Brackets!!;)


(tar cvf test.tar -I include_file ) | rcp test.tar user@host.domain:test.tar


Include only had these contents in it.

AirOra210903.dmp.gz

 
Hello all.

The test with a specific output.tar file works fine to. Please try to make the test like I decribe with a minus to put the tar contents to stdout.

tar cvf - -I <include> | rsh <host> dd of=/dev/rmt/<device> obs=512k

Thank you.
Hugo
 
Works fine for me.

Code:
$ ls signal* > include
$
$
$ tar cvf - -I include | rsh localhost dd of=/tmp/test.tar obs=512k
a signaldoubt 7K
a signaldoubt.c 1K
18+0 records in
0+1 records out
$ tar tvf /tmp/test.tar
tar: blocksize = 18
-rwxr-xr-x 666/1     6372 Dec  3 18:54 2002 signaldoubt
-rw-r--r-- 666/1      184 Dec  3 18:54 2002 signaldoubt.c
$

Obviously not going to a tape device, but that shouldn't matter.

What were you trying to do there unixrocks? Piping a file to rcp? I'm surprised it worked...

Annihilannic.
 
I just thought, your include file wouldn't happen to include &quot;/&quot; in it? That would include everything under root. Likewise if it contains any other directory names; it will include all contents of those directories.

Annihilannic.
 
On my include file there are nothing more than only the filenames. The only diference is the tar device, that in your case is a file and in mine is a tape device...

Regards,
Hugo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top