Server Backup

jahama

Verified User
Joined
Aug 20, 2005
Messages
6
I had a little bit of a scare a few days ago on my server when I thought the zone files got corrupted. When I went to look at the DA system backup files, the zone files were nowhere to be found, and instead I found a sym-link that didn't go anywhere.

I was wondering what other admins were using to back the critical parts of their servers up. I've been exploring using rsnapshot because it's easy to setup. If my server crashes, and I have to restore from my backup, what are the directories that DA lives in that I would need to backup/restore?

Thanks.
 
This is my most recent list of files and directories which we back up. Note that we do not guarantee that these are enough of the files; only that we back up these files using the built in admin directory backup function:

All user directories from /home

Backup directories:
/etc/mail
/etc/virtual
/home/admin
/usr/lib/apache
/usr/local
/usr/share/ssl
/var/log
/var/mail
/var/named
/var/spool/cron
/var/spool/mail
/var/spool/virtual
/var/www
/usr/local/directadmin/data/admin

Backup files:
/etc/exim.conf
/etc/exim.crt
/etc/exim.key
/etc/exim.pl
/etc/group
/etc/gshadow
/etc/hosts
/etc/httpd/conf/httpd.conf
/etc/httpd/conf/ips.conf
/etc/named.conf
/etc/passwd
/etc/proftpd.conf
/etc/proftpd.passwd
/etc/proftpd.vhosts.conf
/etc/resolv.conf
/etc/shadow
/etc/ssh/sshd_config
/etc/system_filter.exim
/usr/local/directadmin/conf/mysql.conf

Jeff
 
Jeff,

Thanks for you quick and detailed response!

When you perform your backups, do you also do a complete server backup (ie. files other than those that DA system backup covers)?

I'm trying to figure out the fastest way to get my customers back up in the event I have a catastrophic drive failure. I know there are several ways to do this (from the inexpensive to the expensive), but before I jump into any expensive solutions, I wanted to find out if anyone had an "inexpensive" way of doing it using the tools built into *nix.

Thanks.
 
jahama said:
Thanks for you quick and detailed response!

When you perform your backups, do you also do a complete server backup (ie. files other than those that DA system backup covers)?
We don't. Perhaps we should.

What we're doing now is keeping systems ready to go; but without anything on them. We're looking into keeping drives with systems already installed but we haven't implemented that.
I'm trying to figure out the fastest way to get my customers back up in the event I have a catastrophic drive failure. I know there are several ways to do this (from the inexpensive to the expensive), but before I jump into any expensive solutions, I wanted to find out if anyone had an "inexpensive" way of doing it using the tools built into *nix.
At today's hardware cost the least expensive way may very well be to have an extra set of hardware ready to roll. Our servers cost about us$1400; a good tape drive system will cost more than that.

Not to mean an extra system replaces backup; it doesn't. But we've been using hard drive backup rather than tape backup for years, and we're beginning to see articles in the professional IT press indicting others are now seeing the simplicity of our way.

Jeff
 
weird DirectAdmin doesn't have /etc/httpd/ and /etc/namedb/ (I'm using FreeBSD) by default on the backup list, isn't it?!
or is there another way to get this data from?! because the /home, DNS info, mail, mysql and httpd info are the most important IMO... at least with those data you can make the server run, even if DA doesn't interact correct with it, crontabs don't work, etc...
 
A lot of the files you're asking about are backed up by sysbk automatically. Nevertheless, I agree I'd like to see them in a list...

Did you see my list above?

I also posted it in the "Full DirectAdmin backup" HowTo, where perhaps some people will look first.

While I don't make any guarantees, I believe the list will result in a system you can fully restore.

I'll ask John and Mark if they're willing to put it into an upcoming release.

Jeff
 
new default lists

Jeff,

How do we implement the new default lists in our running versions of DA? Is there an auto-update that runs or do I need to initiate something on my server?

Thanks,
Jay
 
Re: new default lists

jahama said:
Jeff,

How do we implement the new default lists in our running versions of DA? Is there an auto-update that runs or do I need to initiate something on my server?

Thanks,
Jay

I'm instersted on this too
also, is there some "how to recover server" tutorial?
I know it's probably just a bunch of rsync commands (may have many parameters!)... but anyway it would be cool to have a list of them, so we can react fast if something bad happens...

it would also be cool to see something that would allow us to change the sites IP address if it's needed (maybe it would be easier to restore all files and then change the IPs, but it would mean more downtime for all sites... it would be better if the change were done on the fly)
 
Re: Re: new default lists

jahama said:
How do we implement the new default lists in our running versions of DA?

You can add anything manually on the system backup page in the DA admin control panel.

Or you can reinstall sysbk. But if you reinstall sysbk (I haven't looked at the new file so I don't know how to do that) you'll have to go to the DA admin control panel, and make changes anyway, as all your settings will have been replaced by default settings.

Or you can untar, and then find and copy the files that include the directories and files to backup, to your current sysbk installation. You'll still have to check your DA admin control panel, as you might have changed some of the defaults.

Since all settings require you to check the DA control panel, and since I prefer the first method, I'm not covering the other two methods in complete detail. I don't recommend them.
Is there an auto-update that runs or do I need to initiate something on my server?
From Johns email to me it appears he's not updating anything, but only fixing the default on new installs. And I don't blame him. If he attempted to update current installs he'd run into a nightmare, since by now almost all of us have changed those defaults.

It appears you'll need to do a bit of server administration :cool: .

Lem0nHead said:
also, is there some "how to recover server" tutorial?
Specific to DA? I don't think so.

Generic? Probably. Try Googling.
I know it's probably just a bunch of rsync commands (may have many parameters!)... but anyway it would be cool to have a list of them, so we can react fast if something bad happens...
Hopefully not rsync; that's an awful lot of overhead. What's the difference between rsync and ftp for the end result? Nothing.
If I created a list of commands I'm 75% there towards creating an automated system.

I've written this before and I'll repeat it again:

It requires some direct copying and some intelligent merging. It's that intelligent merging that's a pain to script and that can cause problems.

If you search for my past posts on sysbk you'll probalby find the one that explains in fair detail what you have to do (though it probably didn't include all the necessary files/directories as we learn those as we go).

It's also a great question to ask at a local linux users group, where you can ask questions as you attempt it.

I'd try a dry run a few times if I were you. Nothing speeds up a process like experience.
it would also be cool to see something that would allow us to change the sites IP address if it's needed (maybe it would be easier to restore all files and then change the IPs, but it would mean more downtime for all sites... it would be better if the change were done on the fly)
There are multiple places where the IP#s have to be changed.

DA includes a script you can run afterwards that will change one IP# to another. The last time we ran it we had a problem "losing" the main server IP#, but that might have been our own fault.

If/when we create a commercial server/backup solution it will include the ability to change IP#s.

Jeff
 
Seems like a lot of overhead to me.

I'd do the same either with cp, mv, tar (yes you can tar from an input to an output; you don't need a file or device anywhere) or even cat.

But yes, I see what you mean; you could create a script that would work using rsync.

Jeff
 
I just spent a few minutes looking at this.

Our sysbk install tar's up subdirectories.

Does the one for CPanel?

So for DA's sysbk this wouldn't just work.

Jeff
 
Back
Top