Doin a weekly tape backup - multiple questions - VERY important - Please help
Hi all,
I am getting better at Linux, but still kind of a :newbie: !! Ok, here's what I have for a network setup: RH 8.0 Pro as a server (Cable modem Router, DNS, Samba, Sendmail, etc.), and about a dozen Windoze client machines. The RH 8.0 server has a 120GB HDD in it, but about a total of 30GB is actually used, and I don't expect that it will get to 40GB. I only have a 120GB drive in there because it was cheap when I got it. Anyway, the RH 8.0 machine is also dual-proc. I have recently addes an external SUN DLT 4000 drive to it. The drive is 20/40GB tape capacity. It is hooked up to an Adaptec 2940 SCSI card. So, here's what I want to do: A weekly FULL backup (Say on Sunday nights at midnight). I mean everything on the RH 8.0 box. Also, the tape needs to rewind at the end of every backup. Ok, so what is the best way to do this, and then, how do I actually do it? I run 2 SETI command lines 24/7, so when I go to back up the system, should the 2 SETI processes be stopped first? How could I have them restart after the backup was done. I guess what I am asking is: How do I set up an automatic weekly backup that will have to be compressed (remember the tapes are 40GB compressed, 30GB on the HDD now), and how can I kill SETI automatically when the backup starts, only to restart it after it is done? How would this script look, and where would it go? I have already tried "mt rewind /dev/st0" just to identify the tape drive, but when I tun that command, I get "mt: too many arguments for the command 'rewind'." How can I identify the tape drive so I know where to backup to? Basically, I don't know squat about backups, scripts, cron jobs, etc. If someone could help me out, I'd be most grateful. I NEED to get a full working backup, as I have already lost the server once, and I can't let it happen again. Thanks all!!! Oh, please feel free to explain this to me like I'm a five year old, lol! Chris |
Check man pages for correct mt command options.
mt -f /dev/st0 status There are lots of different backup applications. See www.freshmeat.net, www.linuxapps.com or sourceforge.net etc for ideas. Of course you could use tar which should be already on your system. Have you searched this website for ideas? Consider creating a backup plan. You might want to consider incremental backups everyday and a full backup on weekends. Include planned tape rotation. Practice restoring and verifing your backups every so often. Its not just creating backups that is important, its also knowing that you have good backups and a proven method to restore your system. |
I wouldn't worry about stopping the seti jobs there's little point as they won't effect the backups.
Why do you want to actively rewind the tape? The DLT will handle all this for you, although if you do want to I think you want to use something like Code:
mt -f /dev/st0 rewind Code:
tar cf /dev/st0 / To execute this every Friday you can run Code:
crontab -e Code:
0 10 * * fri /bin/tar cvfz /dev/st0 / HTH Jamie... |
Thanks guys,
I am now running a manual backup of the system using "tar cf /dev/st0 /" It seems to be going right now, but when I ran that command, I got the following: tar: Removing leading '/' from member names tar: /dev/log: socket ignored tar: /dev/gpmctl: socket ignored Now, I haven't pressed "enter" or anything so these messages are still on the screen, and I don't want to do anything until the backup is done, or someone here tells me it's ok. A few more questions? When this backup is done, will the tape rewind automatically? Can I work on the machine while it is being backed up, or is this not a good idea? When I put the backup job in cron, how can I set it up to go at a certain time, not just a certain day? When the backup is done, is it possible to browse its contents? How do I know it has backed up everything indeed? You guys were most helpful, thanks!!! I still have a lod of reading to do, but I like to ask questions like these here, because it gives me the opportunity to get step by step instructions from people like you. There are some Linux things that I know very well, and other things I am still clueless about. Thanks a million, fellas! Chris |
Yes you can work on the PC during the backup process. I wouldn't burn CD's.
Yes it will rewind the tape. /dev/st0 rewind tape /dev/nst0 does not rewind tape Removing lead / is normal because it removes absolute path reference. Don't know about the others. Check man pages for tar options to verify. |
sockets and such
Linux uses file names for a lot of purposes in addition to naming files.
tar: /dev/log: socket ignored tar: /dev/gpmctl: socket ignored means that /dev/log and /dev/gpmctl are socket names, not file names. Backing up a socket is a meaningless concept. So tar skips over those names without doing anything. |
Ok, thank you for the further information. Would anyone know the answers to my other questions?
When I put the backup job in cron, how can I set it up to go at a certain time, not just a certain day? When the backup is done, is it possible to browse its contents? How do I know it has backed up everything indeed? Also,the backup is now done, but there seems to have been a problem. On the screen, I see: tar: /dev/st0: Wrote only 0 of 10240 bytes tar: Error is not recoverable: exiting now I don't understand this, for one thing, it would seem that the entire backup failed, but what's even more strange is that it seems to be telling me that it only had 10240 bytes to backup in the first place. There is around 30GB used on the hard drive! Any thoughts? Also, say I were to experience a catastrophic syatem failure. How do I restore? Many continued thanks, fellas! Chris |
restore
------------------------------------------------------------------------------
Also, say I were to experience a catastrophic syatem failure. How do I restore? ------------------------------------------------------------------------------ You restore with tar. To use tar you need a workable linux that includes tape support. I use a home grown rescue CD to restore my backups which I keep on CD-RW. You could try Knoppix. Whether Knoppix supports tapes is iffy so you should make a trial restore with Knoppix before committing to it as a rescue system. Restoring the entire tape will work for a complete disaster but it is very cumbersome for a missing file or two. I suggest that you also have a backup set on CD-RW or hard disk where you can restore just a few missing files. ------------------------------------------------------------------------------ tar: /dev/st0: Wrote only 0 of 10240 bytes tar: Error is not recoverable: exiting now ------------------------------------------------------------------------------ I am not sure what this means. It may mean that you are using a block size of 10240 bytes and tar was unable to write a block. Yes, if tar failed to write a block and quit then the backup tape is useless. I used to use tape backup before I went to CD-RW. I found that the tapes aged very fast and soon had so many I/O errors that they were useless. ------------------------------------------------------------------------------ |
Quote:
Quote:
Quote:
Quote:
Quote:
cd /mnt/mydata1 tar cf /dev/nst0 . you should be able to restore using mt -f /dev/nst0 rewind cd /mnt/newfilesystem tar xf /dev/nst0 There are probably additional switches you'd want to use (like `B') but the above are pretty basic. You could also look into other backup programs like `cpio' and `amanda' (I think that's the name; it comes on the RH CDs but I haven't tried it yet). If you're using multiple filesystems -- IMHO an excellent idea that can help reduce the extent of data damage should there be some awful filesystem error -- you'll want to use the non-rewinding tape device (nst0) as opposed to the rewinding device (st0) and backup individual filesystems without rewinding the tape between backup/archive commands. Then you can select the correct archive using the file movement commands in `mt' when you need to restore. (Obviously, you need to know what order things were archived onto the tape so you'll know where to position it before restoring.) Good luck, Rick |
I don't need to run stint with my Quantum DLT 4000 tape drive.
Try coping small files from your home directory and restoring to a practice partition. The v option is for verbose. As in the other posts try: tar -zcvf /dev/st0 /home/user/* To restore cd /practice/directory tar -zxvf /dev/st0 More info on tar. http://www.gnu.org/manual/tar/html_mono/tar.html#SEC16 |
Quote:
|
All times are GMT -5. The time now is 03:27 AM. |