I want a redundant backup server


Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"


Top Level » DirectAdmin
Top Level » DirectAdmin » Backup & Restore Process

I want a redundant backup serverLast Modified: Aug 28, 2009, 2:57 pm
Many server admins are always looking to add a level of redundancy to their systems.  DirectAdmin is ultimately designed around a single-server principle, and mirroring of User data is not a default option in DA.

The Multi Server Setup page offer dns clustering to mirror dns zones, and there is an option to run MySQL on a remote box, but neither will actually mirror the User's web data.

There are a few options admins can use to actually create a redundant setup, none of which are setup by default with the DirectAdmin design.

1) Using the Admin Backup/Transfer tool, nightly backups can be made and transferred to a remote DirectAdmin box.   This was only intented to be for backing up your data, however you can create an automated cron restore to take these backups and insert them into another DirectAdmin box after the backups have been transferred, thus giving you a "mirror" of the other box, but with a different IP.  (Note that this will mess up the IPs if this backup box is used with the multiserver setup dns, since the local IP will be used from the restore, overriding the remote IP of the dns cluster).
To create a cron restore, go to Admin Level -> Admin Backups/Transfers, and restore these backups files as you normally would.   Very quickly after issuing the restore, type

cat /usr/local/directadmin/data/task.queue

before the dataskq runs it when the next minute flips over.   The code that is output will be what you add to the task.queue in your cron each time you want to restore a backup.

2) Another method, which is probably far cleaner, doesn't require 2 DirectAdmin licenses, and uses far less bandwidth, but might be more tricky to setup, would be to use rsync.   Rsync is an open source program that most system already have which is used to transfer data between systems quickly, efficiently and securely.  It's benefit is that it checks to see which files have been changed, which files have not been changed, and will only transfer the updated data, saving you a lot of bandwidth.  I won't get into how to use rsync, as there are hundreds of guides online, just search for them.  You will need to use the path list to know which files to copy over.   Just be very careful with /etc/passwd, /etc/group, /etc/shadow, etc..  as any system files you overwrite can potentially take down your system if you get it wrong.  I would probably recommend not transferring system files, like those, if you're not completely confident in what you are doing.
 
Related Helpfiles
How to create a full backup of all accounts via the command line.
Backup creation is slow due to large file sizes
Backups take too long to create. Use rsync for /home

© 2018 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST