Docs / Backup & Recovery / How to Restore from a Backup

How to Restore from a Backup

By Admin · Feb 25, 2026 · Updated Apr 23, 2026 · 172 views · 1 min read

Knowing how to restore is just as important as making backups.

Restore Files from rsync

rsync -avz backup@remote:/backups/www/ /var/www/

Restore MySQL Database

mysql -u root -p myapp < myapp_backup.sql\n\n# From compressed\ngunzip < myapp_backup.sql.gz | mysql -u root -p myapp

Restore PostgreSQL

sudo -u postgres psql myapp < myapp_backup.sql\n\n# Custom format\nsudo -u postgres pg_restore -d myapp myapp_backup.dump

Restore from S3

aws s3 cp s3://my-bucket/backups/db_20240101.sql.gz /tmp/\ngunzip /tmp/db_20240101.sql.gz\nmysql -u root -p myapp < /tmp/db_20240101.sql

Important

Always test your restore process before you need it in an emergency.

Was this article helpful?