Clone Directadmin Server

xy_bogdan

New member
Joined
Jul 31, 2008
Messages
4
Hello,

We have a dedicated server running Directadmin and we recently bought a new server along with a new Directadmin license.
We installed Directadmin on the new server, but it comes with the default settings. Is there an easy way to "clone" the old Directadmin configuration to another server?

Thank you,
Bogdan
 
Hello Bogdan,

If you did all the customization in correct places then it should be sufficient to rsync

- /usr/local/directadmin/conf/directadmin.conf (be careful to check it)
- /usr/local/directadmin/custombuild/custom/
- /usr/local/directadmin/data/templates/custom/
- /usr/local/directadmin/custombuild/options.conf
- /etc/httpd/conf/extra/
- /etc/exim.variables.conf.custom

If you did customize Directadmin other ways, then check the following paths:


https://directadmin.com/paths.html
 
Hello Bogdan,

If you did all the customization in correct places then it should be sufficient to rsync

- /usr/local/directadmin/conf/directadmin.conf (be careful to check it)
- /usr/local/directadmin/custombuild/custom/
- /usr/local/directadmin/data/templates/custom/
- /usr/local/directadmin/custombuild/options.conf
- /etc/httpd/conf/extra/
- /etc/exim.variables.conf.custom

If you did customize Directadmin other ways, then check the following paths:


https://directadmin.com/paths.html

What will be the next step after syncing the above files from old to new?
 
I would verify options.conf and directadmin.conf with each other and install what is not installed yet and not just copy them over, because chance is big you will miss something.
Like create cron in options.conf, enable ssl, letsencrypt. Also you have to install DKIM via the scripts, which will create an entry in directadmin.conf which will not work when just copying the directadadmin.conf over.
So I leave directadmin.conf and options.conf like they are, verify them and then add what is needed by installing it.
After that, install things like csf, you can rsync the configuration, allow and pignore file also.
 
I would verify options.conf and directadmin.conf with each other and install what is not installed yet and not just copy them over, because chance is big you will miss something.
Like create cron in options.conf, enable ssl, letsencrypt. Also you have to install DKIM via the scripts, which will create an entry in directadmin.conf which will not work when just copying the directadadmin.conf over.
So I leave directadmin.conf and options.conf like they are, verify them and then add what is needed by installing it.
After that, install things like csf, you can rsync the configuration, allow and pignore file also.

Thank you for reply. However its not the reply I am looking for.
There must be a command to be executed in order to install software which are synced in the files zEitEr mentioned.
 
There is no Native Cloning option in DA. You have to use your admin skills to come up with a process. As in deciding which file you need where and use
Code:
rsync

To place them on the new server.
 
There must be a command to be executed in order to install software which are synced in the files zEitEr mentioned.
Since you write "install software which are synced" I presume you already put the files over with rsync? Can you explain a bit clearer to exactly what you mean by "in order to install software which are synced" or what you expect the command to do? Then maybe we can help better, because now I don't understand.
Unless it was rsync you ment by the command?
 
Since you write "install software which are synced" I presume you already put the files over with rsync? Can you explain a bit clearer to exactly what you mean by "in order to install software which are synced" or what you expect the command to do? Then maybe we can help better, because now I don't understand.
Unless it was rsync you ment by the command?


After I rsync all files from old server to new

- /usr/local/directadmin/conf/directadmin.conf (be careful to check it)
- /usr/local/directadmin/custombuild/custom/
- /usr/local/directadmin/data/templates/custom/
- /usr/local/directadmin/custombuild/options.conf
- /etc/httpd/conf/extra/
- /etc/exim.variables.conf.custom


There must be a command to build/upgrade to apply the settings from the files which just sync in new server.
 
- /usr/local/directadmin/conf/directadmin.conf (be careful to check it)
Code:
systemctl restart directadmin
if it won't restart you have something in the file it doesn't like. Revert to the backup and diff the 2 files.

for
- /usr/local/directadmin/custombuild/custom/
- /usr/local/directadmin/data/templates/custom/
- /usr/local/directadmin/custombuild/options.conf
- /etc/httpd/conf/extra/
- /etc/exim.variables.conf.custom
I would do this.
Code:
cd /usr/local/directadmin/custombuild
./build update
./build all
This might take an hour.
 
There must be a command to build/upgrade to apply the settings from the files which just sync in new server.
Yep, for options.conf this would be the command Brent stated, we use
./build all d
I don't remember what the d is for always done it like that. However, take in effect that this will not install dkim, maybe 1 or 2 others.
 
/usr/local/directadmin/custombuild/build <option> d : do the default action
/usr/local/directadmin/custombuild/build <option> y : answer yes to all questions
/usr/local/directadmin/custombuild/build <option> n : answer no to all questions
 
Back
Top