Optical Jukeboxes and Drives
1853949 Members
3282 Online
104098 Solutions
New Discussion

Re: TAR Backup

 
Terence_1
New Member

TAR Backup

When tar cvf /dev/rmt/0m file1 is executed form the commnand line , it does not write to
tape but file1 is emptied. Why does tar empty
a file ?

 

 

 

P.S. This thread has been moved from Storage > General to HP-UX > sysadmin.- Hp Forum moderator

When tar cvf /dev/rmt/0m file1 is executed from the commnad line ; it does not write to tape but file1 is emptied. Why does tar empty a file?
2 REPLIES 2
Michael Tully
Honored Contributor

Re: TAR Backup

Hi,

You need to make sure that you have a
full path statement to your file or
telling the shell the current directory.

e.g.

# tar cvf /dev/rmt/0m /tmp/myfile
or
# cd /tmp
# tar cvf /dev/rmt/0m ./myfile

HTH
-Michael
Anyone for a Mutiny ?
Thierry Poels_1
Honored Contributor

Re: TAR Backup

Hi,

tar cvf /dev/rmt/0m file1
or tar cvf /dev/rmt/0m file1 file2 file3
or tar cvf /dev/rmt/0m file*

are all valid syntaxes, pathnames are not mandatory.

I have no clue why your source file gets emptied. Did you check other possibilities ?
- tar ... > file1
- result of other process?
- emptied by other user.
...


good luck,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.