Restore BILLmanager from backup

From ISPWiki
Jump to: navigation, search

You can restore files from a backup copy via:

  1. Control panel
  2. Command line

Restore via control panel

  • Log in to BILLmanager -- the "Tools" section -- "Backup"
  • Select a backup copy you want to restore.
  • Click the "Recover" to recover the entire backup.
  • Click "Details" to choose an object you want to recover. A list of components will open: Files, Databases.
    • Select "Files" to restore the control panel and users. A new list containing "files" will open. Clicking "Restore" will restore all the files in the backup copy. To choose certain files, click the "Details" button.
    • Select "Database" to restore the billing database. A new list containing your database name will open. Clicking "Restore" will restore the database.

The recovery process runs in the background:

  • The archive with data you want to restore will be copied from the storage into a temporary directory,
  • The archive contents will be extracted into the temporary directory,
    • If you are recovering files, the selected files will be moved to new location.
    • If you are recovering the database, the MySQL command will start to add data into the database.

All existing data will be replaced by the data from your backup copy.

Restore via command line

Restoring from database

Upload the file from the storage on the server with BILLmanager

Execute the command

tar -xz --wildcards -O -f /path/to/archive/with/database'*.sql' | mysql -uroot -p billmgr

Execute the following command to upload and restore files from the FTP storage:

curl ftp://example.com/backup_2015-04-01_03-00-00/database-billmgr-1.tgz | tar -xz --wildcards -O -f - '*.sql' | mysql -uroot -p billmgr

Restoring files

Upload the file from the storage on the BILLmanager server

Execute the command

tar -xz -С / -f /path/to/archive/with/files

To restore certain files from the archive

tar -xz -С / -f /path/to/archive/with/files certain_file

Execute the following command to restore the whole data

curl ftp://example.com/backup_2015-04-01_03-00-00/plan1-files-0.tgz | tar -xz -C / -f -