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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dumping one filesystem to multiple tape drives

Status
Not open for further replies.

jumpstart

Programmer
Nov 7, 2002
13
NL
Hi Tekkies!

I've got a Sun E250 that is used as our backup server. We use a combination of rdiff-backup (for the incremental network backup) and ufsdump (for the disaster recovery tape backup) on Solaris 8.

I have 6x72gb disks and we have 8 dds4 drives attached.

My question/problem is:

I want to be able to tell ufsdump to go to the next available tape drive when it hits the EOT mark NOT wait for another tape to be inserted into the same drive.

Has anyone else come across a solution for this?

I've not got any more budget, so I cannot afford to upgrade to DLT or better for the forseeable future.

Thanks for any help in advance,


Greg
 
afaik ufsdump cannot dump to different devices, it will always ask for a new tape, if EOT is reached. I suggest to find out which parts of your filestem fit onto one single tape and backup these directories with a single ufsdump to each drive.

eg
ufsdump 0f /dev/rmt/0cb /oracle/u01 /oracle/u07
ufsdump 0f /dev/rmt/1cb /oracle/u02 /oracle/u05
ufsdump 0f /dev/rmt/2cb /oracle/u03
ufsdump 0f /dev/rmt/3cb /....

the big disadvantage of this solution is: your tapes will never be 100% full and you have to find out of your Directories fit onto the tape before you can start/run the backup
the big advantage of this type of backup: if one of the tapes get's lost or is out of order you can restore the other tapes without problems.

The best solution would be to have a backup utility, such as Lagato, Veritas NetBackup aso. but, I see, you don't get more budget...

Best Regards, Franz
--
Solaris System Manager from Munich, Germany
I used to work for Sun Microsystems Support (EMEA) for 5 years in the domain of the OS, Backup and Storage
 
Thanks Franz,

I've been trying to find a solution to this without using Netbackup/etc for nearly 5 years, so I think it's time for me to give up and buy some software.

Thanks for your help,


Greg
 
well, I don't want to give you a sparc of hope, where there is no hope :), but did you look at some GNU Versions of tar, dump, etc? The Solaris versions can't do that (afaik).

Best Regards, Franz
--
Solaris System Manager from Munich, Germany
I used to work for Sun Microsystems Support (EMEA) for 5 years in the domain of the OS, Backup and Storage
 
How about dumping to stdout, and then using dd to put separate chunks on each tape?

[tt]ufsdump 0f - | (
dd of=tape1 count=100
dd of=tape2 count=100
dd of=tape3 count=100
)[/tt]

Replacing tape1, tape2, tape3 with your tape devices, and 100 with the number of blocks that fit on them. Maybe you can leave off the count because the dd will stop when it hits the end of the tape anyway.

To restore you would do something like:

[tt](
dd if=tape1 count=100
dd if=tape2 count=100
dd if=tape3 count=100
) | ufsrestore -[/tt]

Not sure about the ufsrestore syntax there, don't have access to a Solaris box today.

Obviously you would want to test this thoroughly before you implement it!! :) Just an idea, not sure it's workable...

Annihilannic.
 
Hi Annihilannic,

I'll give it a try, but I think it's a little 'hacky' for my production systems.

Thanks!


Greg
 
The count=1234 can be left out, and if I slip a little bzip into the equation we can compress the backup. This makes the backup take a lot longer on the DDS4 tapes, but it uses less of them (which is always a bonus).

Here's a little script snippet:

#!/bin/bash
TAPE_DRIVES=(`ls /dev/rmt | grep [0-9]$|sort -n|xargs`)

for tape_drive in ${TAPE_DRIVES[@]}
do
tape_drive=/dev/rmt/${tape_drive}
mt -f ${tape_drive} rewind >/dev/null 2>&1
if [ $? = 0 ]
then
AVAIL_DRIVES="${AVAIL_DRIVES} ${tape_drive}"
fi
done

cat > /tmp/dump.script <<EOF
ufsdump 0f - /backup | bzip2 -9 | (
`for drive in ${AVAIL_DRIVES}
do
echo -e "\texec dd of=${drive}cn"
done`
)
EOF

bash /tmp/dump.script


To restore use:

# ( dd if=tapedriveused ) | bunzip2 | ufsrestore ivf -
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top