Restoring Your Scalingo for MySQL® Addon From a Backup or From a Dump

Restoring From a Periodic Backup

Using the Command Line

From a One-Off Container

  1. Follow the procedure to access your MySQL® database from a one-off container
  2. From the one-off command line, download and install the Scalingo command line tool to complete the one-off setup:
    install-scalingo-cli
    
  3. Login to Scalingo:
    scalingo login
    
  4. Still from the one-off, download a backup
  5. Uncompress the backup file:
    tar -xvzf <backup_file>
    
  6. Restore the database from the uncompressed file, using the mysql command:
    mysql --user=<user> --password=<password> --host=<host> --port=<port> <dbname> < <uncompressed_file>
    

    With user, password, host, port and dbname from your original connection URI.

From Your Workstation

  1. Download a backup
  2. Uncompress the backup file:
    tar -xvzf <backup_file>
    
  3. Open a DB tunnel so you can access your database from your workstation
  4. Restore the database from the uncompressed file, using the mysql command (you may have to install it on your workstation):
    mysql --user=<user> --password=<password> --host=127.0.0.1 --port=<port> <dbname> < <uncompressed_file>
    

    With user, password and dbname from your original connection URI and port depending on what you did (default is 10000)

Restoring From a Manual Backup

Manual backups are considered like any Periodic backup. Consequently, please refer to the documentation explaining how to restore from a Periodic backup.

Restoring From a Dump

Using the Command Line

From a One-Off Container

  1. Follow the procedure to access your MySQL® database from a one-off container
  2. From the one-off command line, download and install the Scalingo command line tool to complete the one-off setup:
    install-scalingo-cli
    
  3. Login to Scalingo:
    scalingo login
    
  4. Still from the one-off, retrieve a dump made previously
  5. Restore the database from the dump file, using the mysql command:
    mysql --user=<user> --password=<password> --host=<host> --port=<port> <dbname> < <dump_file>
    

    With user, password, host, port and dbname from your original connection URI.

From Your Workstation

  1. Make sure you have the dump you want to restore at hand
  2. Open a DB tunnel so you can access your database from your workstation
  3. Restore the database from the dump file, using the mysql command (you may have to install it on your workstation):
    mysql --user=<user> --password=<password> --host=127.0.0.1 --port=<port> <dbname> < <dump_file>
    

    With user, password and dbname from your original connection URI and port depending on what you did (default is 10000)


Suggest edits

Restoring Your Scalingo for MySQL® Addon From a Backup or From a Dump

©2024 Scalingo