Help

Restore a backup file

Load the masked backup file from your bucket: psql or mysql for PostgreSQL, MySQL and MariaDB, and a .bak for SQL Server.

For a masked copy with backup files as its output. Washery writes the files to the bucket you chose in the destination account, after the copy passed its check.

PostgreSQL, MySQL and MariaDB files are gzipped SQL. A SQL Server file is a native backup (.bak): see SQL Server below.

Where the files are

Each run writes one folder: <your prefix><database>/<date and time>-<run>/. It holds one file for each database and a manifest.json, which is written last. A folder without a manifest is from a run that failed, so do not restore from it.

The run page in Washery shows the folder and the command filled in.

Restore

PostgreSQL:

aws s3 cp s3://<bucket>/<folder>/<file>.sql.gz - | gunzip -c | psql -h HOST -U USER -d postgres

MySQL and MariaDB:

aws s3 cp s3://<bucket>/<folder>/<file>.sql.gz - | gunzip -c | mysql -h HOST -u USER -p

The file creates the database, so connect to the server and not to a database of the same name. With more than one file, run the command once for each.

mydumper files

A MySQL or MariaDB copy can be written as mydumper streams, which load faster on large databases:

aws s3 cp s3://<bucket>/<folder>/<file>.mydumper.gz - | gunzip -c | myloader --stream --directory /tmp/myloader -h HOST -u USER --ask-password

SQL Server

SQL Server restores a backup from its disk, so download the file first:

aws s3 cp s3://<bucket>/<folder>/<file>.bak .

In SQL Server Management Studio, choose Restore Database, pick Device and select the file. Management Studio places the data and log files for you.

With sqlcmd, list the files in the backup, then restore and say where each one goes:

RESTORE FILELISTONLY FROM DISK = N'C:\backups\<file>.bak';

RESTORE DATABASE [<database>] FROM DISK = N'C:\backups\<file>.bak'
WITH MOVE N'<data logical name>' TO N'C:\data\<database>.mdf',
     MOVE N'<log logical name>' TO N'C:\data\<database>_log.ldf';

Two limits come from SQL Server:

  • Your SQL Server must be the same version as production or later. SQL Server 2019 cannot restore a backup made by SQL Server 2022.
  • SQL Server Express holds up to 10 GB for each database. SQL Server Developer is free and has no limit.

To restore into Amazon RDS, use msdb.dbo.rds_restore_database with the file in S3.

If psql reports errors

Files made by pg_dump 18 contain \restrict lines. A psql released before August 2025 reports them as unknown commands and carries on. PostgreSQL 16 and earlier also report unrecognized configuration parameter "transaction_timeout". The restore is complete in both cases.

Related

Still stuck

Tell us what you were doing and what you saw.

Email support@washery.io