How to backup more than one time on same tape using DLT tape?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to backup more than one time on same tape using DLT tape?
Hi, I am have a DLT tape drive is 20/40GB model,than at /dev/st0. Now attach to my redhat enterprise linux system.
First time i am backup a folder /home to DLT tape:
# tar -cvf /dev/st0 /home
than ok, all file inside /home directory have been backup, i have try to check on command # tar -tvf /dev/st0.
I want to backup another directory is /etc on the same DLT tape just now, than i using same command # tar -cvf /dev/st0 /etc ,than all file show are backup. But when i want to check all my backup using command # tar -tvf /dev/st0 why just only show me the latest backup "/etc" file, than my previous backup file "/home" not show at all??
Is it my method to backup 2 or more time and continue backup at same tape are wrong?
In RHEL5 is it have any easy method(GUI) software to manage backup? is it Amanda?
The device /dev/st0 will rewind the tape when the current operation is complete.
The device /dev/nst0 will not rewind the tape when the current operation is complete.
Therefore when the first backup of your /home completes the tape rewinds and the second backup i.e /etc overwrites the first. Using /dev/nst0 will not cause the rewind to tape.
You could also use tar to *append" /etc to the /home archive.
A quick look at man tar, and a bit of reseach into DLT drives, and it seems to me that you could do:
Code:
tar -cvf /dev/st0 /home
to begin the archive, then
Code:
tar -rvf /dev/st0 /etc
to append /etc to the /home archive. It will take a while longer than michaelk's suggestion because the tape will have to unwind to the end of /home before writing /etc to the archive.
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197
Rep:
Following up on michaelk's post, use /dev/nst0 as the device. Then when you tar a directory or partition to the tape it will be left positioned at the end. You can then tar another to the same tape and have two tape files. Continue until you hit the end of the tape (if you do).
To find out what's up with the tape, use the mt command. `mt -f /dev/nst0 status` will tell you where it is positioned. `mt -f /dev/nst0 rewind` or `mt -f /dev/nst0 fsf 1` etc. allow you to rewind or reposition the tape.
Of course, you could use Amanda to manage your backups. It might be overkill for just one machine, but then you would have learned a new tool. It is not GUI based, but it is very straightforward from the command line.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.