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.
You need some appreciation of which apps are running when. You said you're a small op, so overnight I'd expect little to no activity, apart from maybe incoming emails.
I'd start by doing a few backups manually to get used to the process and do a few restores(!) to check it works ok.
Then, start (auto) backing up at night using cron. If you have a DB running you've got 2 options (using MySQL as an example):
1. use mysqldump, which temporarily locks the tables to get a consistent view, or 2. use a cold backup ie script a shutdown, do a file level back, restart db. (There are more advanced options, see docs).
There is sendmail, a mostly static webpage, and then several hundred user accounts with files. The user files are all in one place. I suppose I could put the tape in the drive and back up the user files remotely during the least busy time.
Except for whatever sendmail uses, there is no great database. Just individual user files.
Maybe I should be taking the server off-line. Still, I don't recall that being done. Then again, my old boss only did tape back-ups once a month (or worse) by the look of it. A few tapes show a week to week back-up, but for the most part it is a good month. He probably backed up more often only when making major system changes.
What a nightmare... I really need to back-up asap. I might just go ahead and do a messy back-up and consider it better than nothing and see if I can do anything better next week.
Honestly, back up the emails but those shouldn't be a high priority. How are the users fetching them, through POP or IMAP? If by POP, they're usually downloading them locally which then removes them. If by IMAP, I could suggest just writing a script that shuts down sendmail, take backup or snapshot perhaps, then fires it back up. A properly setup email server, if emails are getting sent while it's down, they'll just queue up and get resent.
Depending on the size and amount of email coming through, it probably wouldn't even hurt to shutdown for a couple of hours in the night to back them up if it is a requirement from the company to back up email. Also if you have a secondary server, that would ensure emails still get delivered, then a quick resync when the primary server comes back online.
We have just the one email server. Email is accessed by pop by some people, and by logging into the machine directly and using a client like pine.
New question: the tape on this machine is named sa0 instead of st0. Also there is an sa0.0 through sa0.3 (I think that refers to 4 different operating speeds with the original entry allowing the tape drive to set its own speed).
Is there a reason it is sa0 instead of st0?
I'm not as worried about email as I am about user files in general. The sender of an email can resend the email if necessary so it won't be the end of the world if unfetched email is lost or corrupted. User files are a bigger concern.
I think the difference between sa0 and st0 is st0 represents an auto-rewinding tape drive, sa0 is not an auto-rewinding tape drive. Check your tape drive to see if it is an auto-rewinding drive.
Edit: Sorry, nst0 would be non-rewinding tape drive. I think sa0 is a BSD style or based. What OS is this on by the way?
So as for the users using POP or pine directly on the system, yeah, I'd say if they're not keeping emails on the server while using POP, don't even bother backing it up. As for those using pine, maybe advise them to archive the email or have pine move it locally into their /home directory, then just back up /home. And warn POP users that if they store messages or choose not to delete within their client from the server after retrieving, that you are not backing these up. That would be my solution and avoid having to even worry about backing up email.
Yes it is a FreeBSD OS. There is sa0 and nsa0 to control whether or not it rewinds as with st0 and nst0.
There is another system running Sun Solaris 5.9 (aka Solaris 9). I decided that I'm going to back up this system first as a test since it's slightly less important and there are already good backups since this isn't really used during the summer. I can't find the tape though!
Edit:
Nevermind, the rst entries are definitely the tape drive. I just don't know why there are so many
rst12
rst18
rst20
rst26
rst28
rst34
rst36
rst42
Do the numbers possibly refer to flags for different settings? The same drive installed on the BSD machine only had 4 or 5 modes listed (sa0, and sa0.0 to sa0.4) whereas this Solaris machine has 8.
I forgot the explanation of the amount of numbers or listings, usually just a default number during the bootup initialization, I don't have access to any Solaris machines, haven't had to deal with them in a few years. The rst don't happen to be links do they?
ls -l lists all of these as: lrwxrwxrwx so I suppose that means they are links. They point to /devices/pci@8,700000/scsi@5/st@5,0:
...and several other variations on the last bit that reflect the alphabet soup I posted above. scsi@5 is definitely the tape drive though.
I think it will probably work if I just write to /dev/rmt/0 or maybe /dev/rst12
If not... I'm sure one of them is right. I'll figure it out somehow. I need to stop acting like a n00b and start figuring things out for myself (at least partially) anyway!
Thanks for all your help. And I'll keep monitoring this thread incase you or anyone else has anything else helpful to say.
The rst12 to rst42 are all links as well. some of them match the /devices/pci@8,700000/ stuff in the /dev/rmt/ directory, and a few are links to the entries in the /dev/rmt directory.
Figured most would be links. I'd probably guess since you only have one drive, it's going to be /dev/rmt/0 is the device to use that is linked to the tape drive. Either that or /dev/rst0 if it exists.
I have everything backup up to tape but that's only so I can go back and get individual configuration files that may be in non-standard locations if needed after a disaster. I would not bother restoring an OS from tape. If there was that big from a problem I would reinstall / upgrade to the latest version of my preferred operating system before proceeding. I keep a spare disk in my server that I use for backing up my mysql databases, web page content, and other changing content that I need. If I make a mistake I can restore my content quickly, and if there is a big disaster where I lose the disks then I still have the ability to get what I need from tape after the operating system is reinstalled.
Figured most would be links. I'd probably guess since you only have one drive, it's going to be /dev/rmt/0 is the device to use that is linked to the tape drive. Either that or /dev/rst0 if it exists.
The other nrst and rst entries point to some device on Scsi channel 4.
So those are my tape commands with and without rewind. Each of the 4 represents the 4 different operating modes for this drive. I guess I need to look up those modes... problem is I'm not sure which command corresponds to which mode or which mode I ought to use.
I have everything backup up to tape but that's only so I can go back and get individual configuration files that may be in non-standard locations if needed after a disaster. I would not bother restoring an OS from tape. If there was that big from a problem I would reinstall / upgrade to the latest version of my preferred operating system before proceeding. I keep a spare disk in my server that I use for backing up my mysql databases, web page content, and other changing content that I need. If I make a mistake I can restore my content quickly, and if there is a big disaster where I lose the disks then I still have the ability to get what I need from tape after the operating system is reinstalled.
-Raymond
I think that would be the better way to go as long as it could be done quickly and the sysadmin knows what he's doing enough to actually do that (I'm going to have to figure that out by the end of the year in order to migrate to the new server hardware my old boss purchased before he resigned).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.