Dabackup.com

Documentation

Introduction

Welcome to the Documentation of Dabackup, This is an online manual for Dabackup and an information repository regarding the technical aspects of Dabackup. Dabackup is a plugin for the Hosting Control Panel Directadmin. The main highlight of the plugin is, it comprises of both compressed and incremental backups, transferred to a local storage location or to a remote storage location via ssh (Public Key based authentication). It will support 7 days backup retention and also has the feature to restore in any directadmin server with/without the help of dabackup tools.

For any further technical assistance, you may please contact our Technical Support Department.

Requirements

To Enhance the Backup features of your Directadmin server with Dabackup, the basic requirement is a stable release of Directadmin with PHP version 5.3. or higher (If you are using freeBSD, this plugin is not tested for it).

  • Linux Directadmin server latest stable version
  • Either php-curl or allow_url_fopen enabled in php
  • Ioncube enabled in php
  • PHP version 5 or later
  • Suhosin disabled
  • safe_mod= Off

Install Dabackup

The installation procedure of Dabackup is a very simple process.If you wish to install Dabackup yourself, the following guide will help.

Download the latest dabackup from https://syslintportal.com/downloads.php You may need to login to this portal prior downloading the file. The file will be in a tar(tarball) format with a name dabackup.X.Y.tar.gz, where X.Y is the version . Now upload this to your server and begin the installation as follows:

# tar -xzf dabackup.X.Y

# cd dabackup/

# sh install.sh

From here on you can configure dabackup accordingly that suits you the best. If you are upgrading from a lower version below i2.0 , please make sure to upgrade the license to the new version before installing it. You can simply open a support ticket from your client are for upgrading your licenses. It is free.

Configure Dabackup

Dabackup can be configured either as incremental ( no compression for home folder ) or compressed ( full gzip compression ) backup. You can also chose the Backup Storage Location either as Local Folder ( Same server HDD ) or Remote SSH Account ( Remote server ). You can enable/disable daily, weekly and Monthly backups. If you enable the 7 days retentions, then the daily and weekly backups won’t work, since 7 day retention backups will hold daily and weekly file modifications.

Dabackup use the mysqldump tools for taking mysql backups. If you chose the backup types as compressed , then it will gzip the mysql backups, else it won’t compress the backups. Configuration Required for Remote Storage is needed Only If you are choosing the storage location as a remote(Linux server) ssh account. Then you need to configure the dabackup ssh public key under the remote ssh account. You can copy the ssh public key either from the file / usr / local / directadmin / plugins / dabackup / key / id_rsa.pub files or from the directadmin plugin page->public key. Please make sure that there is n't any space within the public key. So copy the above pubic key, then login to the remote ssh account, then do the following steps,:

# cd ~/

# mkdir .ssh

# touch .ssh/authorized_keys

# chmod 750 .ssh/

# chmod 600 .ssh/authorized_keys

Now enter the public key to the file .ssh/authorized_keys. To test this key setting , please use the following command:

#ssh -F /usr / local/directadmin/plugins / dabackup/key /ssh_config  backup-user@backup-server-ip -p SSH_PORT

If the above command will allow you to login to the ssh account without password , then your configuration is perfect

Uninstall Dabackup

To remove the Dabackup Plugin execute the script as follows:

# sh /usr/local/directadmin/plugins/dabackup/scripts/uninstall.sh

Restore A Backup Using Dabackup Tools

To restore an account from daily | weekly | monthly | Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday backups . First you need to take a backup of your current account to a secured location ( /usr/src/ ) from your directadmin. Then terminate that account . After that restore the account as follows , ( see an example of a user MYUSER under the reseller MYRESELLERR and need to restore from weekly )

# cd /usr/local/directadmin/plugins/dabackup/scripts/

# ./darestore  --user=MYUSER  --from=weekly --type=full --reseller=MYRESELLER

Restore A Backup Using Directadmin

To restore an account from daily | weekly | monthly | Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday backups . First you need to take a backup of your current account to a secured location ( /usr/src/ ) from your directadmin. Then terminate that account . After that restore the account as follows , ( see an example of a user MYUSER under the reseller MYRESELLERR and need to restore from weekly )

i) If you are using compressed backups copy the backup file from the storage location ( path-to-storage / weekly / MYUSER / user.reseller.MYUSER.tar.gz ) and upload under the user_backups folder of reseller , then login to the reseller control panel of directadmin and restore the backup.

ii) If you have incremental backup. Please do the procedure from step i , then rsync the homedir files to the home folder of that user ( from path-to-storage/weekly/homedir to /home/MYUSER ) , then set the following ownerships.:

# chown -R MYUSER:MYUSER  /home/MYUSER

# chown -R MYUSER:mail  /home/MYUSER/{imap/Maildir}

How To Change Backup Time

Backup process of the plugin is based on a scheduled cron, that runs (root user) after midnight based on the server time. You can customise the cron accordingly. The cron is as follows:

0 1 * * * /usr/local/directadmin/plugins/dabackup/scripts/dabackup  > /dev/null 2>&1

To change the backup time login to your server as root , then edit the cron using the command “crontab -e ” . Please refer the crontab documentation to know more about setting cron in a linux server . Multiple crons on same day may damage the backups.

How to Run a Manual Backup

If you need to perform a manual backup process, Just execute the following script from your server terminal:

# /usr/local/directadmin/plugins/dabackup/scripts/dabackup