Restoring a backup in KeyHelp Print

  • keyhelp, restore, backup, 7-zip
  • 0

Restoring a KeyHelp backup is done manually: the backup file is an archive, and you take out of it only what you need. This is more work than a one-click restore, but it also means you can recover a single database or one site without touching anything else.

Opening the archive

Backup files are packed with 7-zip. Open them with any program that handles the .7z format, or on the server itself:

7za x <archive_name>.7z

If the backup was created with password protection, you will be asked for the password — without it the archive cannot be opened at all.

What is inside

A user backup — created by a user account, covering that account:

  • database/ — MySQL dumps of the user's databases;
  • home/ — a tar archive of the user's home directory;
  • mail/ — the user's mailboxes.

A server backup — created by an administrator account, covering the whole server:

  • config/ — tar archives of /var/spool/cron, /etc, /home/keyhelp and /root;
  • database/ — dumps of all databases, with each user's in its own subdirectory;
  • home/ — home directories of all users;
  • mail/ — all mailboxes, separated by user.

Restoring what you need

Files. Unpack the relevant tar archive from home/ and copy back only the files you need. Check ownership and permissions afterwards — files restored as root will not be readable by the web server.

A database. Import the dump from database/ into the existing database. Remember that importing replaces the current contents, so export the current state first if there is any doubt about which version you want.

Mail. Unpack the mailbox from mail/ and put it back in place, again checking ownership.

Take a fresh backup of the current state before restoring anything, even if the current state is broken. If the restore turns out to be the wrong one, that copy is your only way back.

After restoring

Check that the site opens, that mail is being received, and that the CMS can still reach its database — a restored database user may have a different password from the one in your configuration file.

If you are not sure what to extract or where to put it, open a ticket from your client area, telling us which backup you have and what needs to be recovered. Do not run repeated restore attempts in the meantime — each one overwrites the state we would use to work out what happened.

To create backups, see Scheduled backups in KeyHelp.


Was this answer helpful?

« Back