Restoring Shares from a Backup

The following instructions assume you have a Shares backup. For instructions on backing up Shares, see Backing Up Shares and the Database.
Note: If you are restoring Shares on a new installation, make sure your MySQL password on the new installation matches the password of the backed up MySQL database.
  1. Stop Shares services.
    Run the following script as root. The script stops Shares services, restores Shares data, and restarts Shares. You cannot use this procedure with earlier versions of Shares.
    # /opt/aspera/shares/u/setup/bin/restore /your_backup_dir/backup_id
    For example, using the ID of the example directory generated in Backing Up Shares and the Database.
    # /opt/aspera/shares/u/setup/bin/restore /tmp/20130627025459
    The Terminal returns the following information:
    Checking status of aspera-shares ...
    Status is running
    mysqld is alive
    Restoring the Shares database and config files ...
    Migrating the Shares database ...
    Initializing the Shares database ...
    Configuring the stats collector to poll all nodes ...
    Restoring the SSL certificates ...
    Done
  2. Update the restored Shares to retrieve information from the new stats collector database.
    # /opt/aspera/shares/u/shares/bin/run mysql -e 'delete from transfer_reporters'
    Tip: Shares does not currently back up the stats collector database. You must perform this step to enable transfer notification emails.