Backup installation from CLI

From Softaculous Wiki
Jump to: navigation, search

Backup an installation from Command Line


Softaculous allows you to backup an installation from command line. Here is the guide:

  • Use the following command to backup an installation :
 Root> php /path/to/softaculous/cli.php --backup --user=USER --insid=INSID --backup_location=BACKUP_LOCATION
  • Thats it. The installation is now backed up.

Parameters

  • In the above command the first parameter should be --backup as this parameter will initiate the backup function.
  • --user=USER - Here USER is the user under which the installation is made.
  • --insid=INSID - Here insid is the installation id of the installation you want to backup.
  • --backup_location=BACKUP_LOCATION - Here backup_location is the location id of the backup location where you want to store your backup. You can find the location id of the backup location from the URL of Edit Backup Location page. Default will be the backup location selected in the installation settings.

Optional Parameters

Note : These parameters are optional and if none of these parameters are passed the full installation i.e. directory as well as database will be backed up.

  • --dir=1 - Use this parameter if you want to backup the directory.
  • --db=1 - Use this parameter if you want to backup the database.
  • --datadir=1 - Use this parameter if you want to backup the data directory (some scripts have data directory).
  • --wwwdir=1 - Use this parameter if you want to backup the web directory (PERL scripts have web directory).

So if you pass only --db=1 parameter, then only the database of your installation will be backed up. Similarly if you pass only --dir=1 parameter only the directory of your installation will be backed up.