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.
OK, mode 1 is what I need for sure, or mode 2 if I want to disable tape compression.
I went ahead and started the backup *crosses fingers*
Will users notice a serious drop in performance as the tar program reads every single file on the server? CPU usage looks minor, but I'm worried about disk access (I guess that's a good reason to do it during low usage time).
I decided I'm not worried if a few files get corrupted. I think it's reasonably likely that none will anyway. Each file (unless it happens to be very big) would be written to the tape very quickly, so it's not *too* likely that the file will be in the process of being modified when the tar program picks it up (unless the file is modified very frequently).
I think I'm getting the hang of this. The big server needs two tapes. I think the data will fit on the tapes using the configuration below. I test compressed a 100 MB of mail and it was neatly cut in half so I know it will all fit. Same with the second tape.
Any reason the following scripts wouldn't work? Any suggestions to improve them?
Code:
#!/bin/csh
mt -f /dev/nsa0 rewind
tar cvzf /dev/nsa0 /dev #individual partitions
tar cvzf /dev/nsa0 /local
tar cvzf /dev/nsa0 /mail
tar cvzf /dev/nsa0 /scratch
tar cvzf /dev/nsa0 /soft
tar cvzf /dev/nsa0 /tmp
tar cvzf /dev/nsa0 /usr
tar cvzf /dev/nsa0 /var
tar cvzf /dev/nsa0 /u1
tar cvzf /dev/nsa0 /1* #all files and folders on root partition
tar cvzf /dev/nsa0 /2*
tar cvzf /dev/nsa0 /3*
tar cvzf /dev/nsa0 /5*
tar cvzf /dev/nsa0 /6*
tar cvzf /dev/nsa0 /7*
tar cvzf /dev/nsa0 /8*
tar cvzf /dev/nsa0 /A
tar cvzf /dev/nsa0 /C*
tar cvzf /dev/nsa0 /b*
tar cvzf /dev/nsa0 /c* #does it matter if I pick cdrom?
tar cvzf /dev/nsa0 /d* #does it matter if I pick up dev?
tar cvzf /dev/nsa0 /e*
tar cvzf /dev/nsa0 /h*
tar cvzf /dev/nsa0 /i*
tar cvzf /dev/nsa0 /k*
tar cvzf /dev/nsa0 /li*
tar cvzf /dev/nsa0 /lp*
tar cvzf /dev/nsa0 /mnt #does it matter if I pick up mnt?
tar cvzf /dev/nsa0 /mo*
tar cvzf /dev/nsa0 /n*
tar cvzf /dev/nsa0 /p*
tar cvzf /dev/nsa0 /r*
tar cvzf /dev/nsa0 /sbin
tar cvzf /dev/nsa0 /stand
tar cvzf /dev/nsa0 /sy*
tar cvzf /dev/nsa0 /tempmail
tar cvzf /dev/nsa0 /usbd.corer
mt -f /dev/nsa0 rewind
AND:
Code:
#!/bin/csh
mt -f /dev/nsa0 rewind
tar cvzf /dev/nsa0 /u2
tar cvzf /dev/nsa0 /u4
mt -f /dev/nsa0 rewind
... on the other server wasn't such a good idea. This /proc/ directory is causing all kinds of trouble and after looking up info about it... it's probably a bad idea to include it.
Is there any way to tell the system to tar / but skip /proc ? If so, is there anything else I should skip? Is this going to ruin the backup (it's giving a lot of errors (arg list too long, is not a file, file changed size, invalid argument) although it keeps on going).
It's also seriously degrading system performance although no one is using this system but me at the moment thankfully.
EDIT:
Well, it made it through finally. I'm coming to work tomorrow to back up the other server if I can get some good intel from you guys. Thanks Otherwise... it might have to wait until monday night though things are going to get busier and busier ...
Yeah, don't backup /proc or /dev, they're really pseudo type filesystems, they don't really exist when you turn the machine off and created when the machine is turned on.
I also usually exclude /tmp and some of /var where I don't need to backup logs as I usually have a centralized loghost anyways.
And if you don't have a lot of customized applications in /usr, you can usually omit that as well since you can do bare metal recoveries by installing the base OS first, then applying the backed up data, etc.
Yeah, don't backup /proc or /dev, they're really pseudo type filesystems, they don't really exist when you turn the machine off and created when the machine is turned on.
I also usually exclude /tmp and some of /var where I don't need to backup logs as I usually have a centralized loghost anyways.
And if you don't have a lot of customized applications in /usr, you can usually omit that as well since you can do bare metal recoveries by installing the base OS first, then applying the backed up data, etc.
On one of the systems I'm using, the previous admin made a directory:
/var/adm/lists
And there are some important scripts in it. For now can't skip anything except /proc and /dev
Unless there is a really large chunk of data somewhere that I can be sure is not vital (as I could use a bit of space).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.