Thread: tar
-
halo:
thank you for you reply.
however , waht i want to know is not how to hot backup
what i want to know is how to use tar under cron.
my concern is how to make sure that tape is go all the way
to the end, otherwise, i may overwrite some other useful
content preexisted in tape.
I write a script like below, but it always give me error:
if: Malformed file inquiry
i don't know what's wrong.( the only thing i have is a simple tape driver)
#!/usr/bin/csh
set myfile = "/tmp/myfile$$"
set a = 1
tar -tvf /dev/rmt/0
#the loop below is used to make sure tape is go
#to the end. so no content will be overwrited.
while ($a)
tar -tvf /dev/rmt/0n | awk '{print $1}'>>$myfile
foreach i (`cat $myfile`)
if ( $i == "tar: blocksize = 0" ) set a = 0
end
rm $myfile
end
tar -cvf /dev/rmt/0n /backup-dir
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|