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
- Follow the procedure to access your MySQL® database from a one-off container
- From the one-off command line, download and install the Scalingo command
line tool to complete the one-off setup:
install-scalingo-cli
- Login to Scalingo:
scalingo login
- Still from the one-off, download a backup
- Uncompress the backup file:
tar -xvzf <backup_file>
- 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
anddbname
from your original connection URI.
From Your Workstation
- Download a backup
- Uncompress the backup file:
tar -xvzf <backup_file>
- Open a DB tunnel so you can access your database from your workstation
- 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
anddbname
from your original connection URI andport
depending on what you did (default is10000
)
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
- Follow the procedure to access your MySQL® database from a one-off container
- From the one-off command line, download and install the Scalingo command
line tool to complete the one-off setup:
install-scalingo-cli
- Login to Scalingo:
scalingo login
- Still from the one-off, retrieve a dump made previously
- 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
anddbname
from your original connection URI.
From Your Workstation
- Make sure you have the dump you want to restore at hand
- Open a DB tunnel so you can access your database from your workstation
- 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
anddbname
from your original connection URI andport
depending on what you did (default is10000
)
Last update: 16 Apr 2024
Suggest edits