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.
    Click Start > Control Panel > Administrative Tools > Services and stop the following services:
    • Aspera Nginx Service
    • Aspera Delayed Job Service
    • Aspera Web Services
    • Aspera Stats Collector
  2. Update database.yml, cert.pem, and cert.key files.
    Replace following files with the backup versions:
    C:\shares\nginx\conf\cert.pem
    C:\shares\nginx\conf\cert.key
    C:\shares\www\config\database.yml
    Important: If you are restoring the backed up Shares onto a new installation of Shares, do not restore the database.yml file. Changing the database.yml file may force Shares to use a MySQL password different from the one used during the fresh install.
  3. Run the restore command.
    Open Command Prompt as an administrator and run the following commands. In the example below, E:\aspera-shares-restore is the directory where the backup files are stored on the new server.
    > cd C:\shares\www
    > bundle exec rake restore DIR=E:\aspera-shares-restore
    > bundle exec rake db:migrate
    > bundle exec rake init
    > bundle exec rake aspera:stats_collector:add_all_nodes
  4. Start Shares services.
    Click Start > Control Panel > Administrative Tools > Services and stop the following services:
    • Aspera Nginx Service
    • Aspera Delayed Job Service
    • Aspera Web Services
    • Aspera Stats Collector