Script: Import multiple DirectAdmin backup files and restore them at once in HestiaCP

Hello all,

With this script, you can import multiple DirectAdmin backups and restore them all at once in HestiaCP. The script will process each DirectAdmin backup file one by one.

You can download and run the script using the commands below. If the ‘v-import-directadmin’ script is not already present in your installation, the script will automatically download it for you.

wget -O import_da.sh https://gist.githubusercontent.com/ricardo777/7a77376f1da4766f9de6ffc49878e875/raw/1ffa8735e8574c2e674796ed3e33b71109ed9675/import_da.sh
chmod +x import_da.sh
./import_da.sh

Configuration Options:

Before running the script, ensure you have the correct paths and parameters set within the script:

  • Backup Directory: BACKUP_DIR="/root/daimport/backups"
  • Log File: LOG_FILE="/root/daimport/da-import-log.txt"

These settings should already be in the script.

For the import script (v-import-directadmin), you can set the following parameters within the script if necessary:

  • debug=1 (Enable debugging)
  • hestia_package=default (Specify Hestia package)
  • letsencrypt_enable=1 (Enable Let’s Encrypt)
  • addusertext='IMPORTED' (Custom user text, will be added in ‘Contact Name’ in HestiaCP user account)
  • tmp_dir='tmp_dir_da_backup' (Temporary directory for backups)
3 Likes

Hi, anyone have tried this script? How it did go? Good?

You can use DirectAdmin to create a backup, download it, test it, and maybe get results!

I tested the script througly, on multiple direct admin servers. But it is always important to make good backups.

The topic script is only a script that pulls the import script from the Hestiacp GitHub when you not have it already and has some coding to allow importing multiple files at once. Which the Hestiacp does not support natively.

When you run into issues, please let me know so I can fix them.

1 Like