Restore Installation from CLI

From Softaculous Wiki
Jump to: navigation, search

Note : At the moment this is possible for cPanel only.

Restore a Script from Command Line (Only For cPanel)


Softaculous allows you to restore a script from command line. Here is the guide:

  • Use the following command to restore the script :
 Root> php /path/to/softaculous/cli.php --restore --file=FILENAME --restore_dir=1 --restore_db=1 --restore_datadir=1 --restore_wwwdir=1
  • Thats it. You have restored your backup on your server.

Variables

  • In the above command the first parameter should be --restore as this parameter will initiate the restore function.
  • --file=FILENAME - Here FILENAME is the name of the backup file (.tar.gz) to be restored. For eg.: wp.26_45368.2015-11-17_05-26-39.tar.gz
  • --restore_dir=1 - If set to 1, it will restore the installation directory.
  • --restore_db=1 - If set to 1, it will restore the database.
  • --restore_datadir=1 - If set to 1, it will restore the installation's data directory. This parameter is used only if the script contains the Data Directory
  • --restore_wwwdir=1 - If set to 1, it will restore the installation's www directory. This parameter is used only if the script contains www directory.