Is there a way to backup all users at once?

digilexic

Verified User
Joined
Nov 5, 2003
Messages
67
Is there a way I can backup all my users/resellers/admins accounts/websites at once from direct admin? And if so is there a way to restore it after the fact?
 
Have you got the paths of what gets backed up for individual sites?

I might get onto a simple cronjob type script that could compress what a normal backup would include and have an option to either ftp it elsewhere or move it to a default location on the server... with a bit of time of course :D


Chris
 
That would be great :)

Perhaps this could just be a perl script that a server administrator can run when necesarry. It would eat up many resources and I guess you don't want a complete full backup every day.
 
Actually, the backups have to come before the transfers, because the backups are what will be transferred, but they're both at the top of the list.

John
 
John, just wondering, if you backup up the whole directadmin area (/usr/local/directadmin) will account data be restored as you restored the data (are accounts and all info there, or a database elsewhere or...?)

Chris
 
ProWebUK said:
John, just wondering, if you backup up the whole directadmin area (/usr/local/directadmin) will account data be restored as you restored the data (are accounts and all info there, or a database elsewhere or...?)

Chris

I had to do this once before, when changing to a different server with a different IP address. I'm sure these instructions aren't complete, but it should at least help you get started.

First, I would update DA on the old server to the newest version. Also request that the license be changed over to the IP of the new server.

Next, backup these directories, I did it by going one level below the directory in question, then typing "tar czf directory.tar.gz directory". When you restore it, simply place the directory.tar.gz file one level below where it'll go (i.e. if the full path is /usr/local/directadmin/data, you want to put the data.tar.gz file in /usr/local/directadmin) and type "tar xzf directory.tar.gz".

/usr/local/directadmin/data
/etc/httpd/conf
/var/named
/home
/var/lib/mysql
/var/spool/mail
/var/spool/virtual

Also backup these files:

/etc/proftd.conf
/etc/proftpd.vhosts.conf
/etc/proftpd.passwd
/etc/passwd
/etc/shadow

Next, install DA on the new server. Make sure you specify the old MySQL password in the setup.txt file after it asks you the config questions (and before it's started the install).

Now stop the directadmin service (service directadmin stop). Restore the backups made above. I'd make a copy of the new server's /etc/passwd and /etc/shadow files before replacing them with the old server's copies. Also note that if you had a different root password on the new server, you will now have to use the root password of the old server next time you login.

Now, follow these instructions to change all the IPs over to what they should be:

http://www.directadmin.com/change_ip.txt

After you restart all the services, you should be in business. Since DNS changes take some time, here's a way to jumpstart the process and direct people to the new server right away. Go into your /var directory, and type "tar czf named.tar.gz named" to backup the named directory. Ftp this file to the old server and place it in the /var directory. Type "tar xzf named.tar.gz" to restore it. Restart named (service named restart). Now your old server will direct users to the new server. Just be sure to actually change the IPs for your nameservers with your domain registrar as you normally would.

Login to some of the accounts, make sure everything's working, websites are online, mail works, etc. Try to keep the old server around for at least several days (if not a week or longer) just in case you missed something.
 
If you are doing the backup/transfer thing, I would recommend using that sysbk, very cool program, i'm posting my recent transfer on the backup guide post and what problems I ran into.
 
Back
Top