Appearance
How to restore application from backups
In the event of an emergency, here is how to restore:
- Go to S3 backups
- Select
IxDFfolder - Download the latest backup (format
YYYY-mm-dd-hh-mm-xx.zip) - Log into production forge
- Grab the archive password from
BACKUP_ARCHIVE_PASSWORDenvironment variable - Extract the archive using the password
MySQL Restoration
To restore MySQL, you have to follow the steps above.
Testing locally
- Locate the MySQL dump under
db-dumps - Drop your local DB
docker compose down -v && docker compose up -d - Extract and import the dump
bash
bunzip2 < ~/Downloads/2022-10-10-04-23-01/db-dumps/mysql-forge.sql.bz2 | mysql -h 127.0.0.1 -P 33060 -u ixdf_web -psecret ixdfRestoring it on other servers
- Locate the MySQL dump under
db-dumps - Move the file to the server
bash
scp /path/to/db-dumps/mysql-forge.sql.bz2 forge@staging.ixdf.dev:/tmp/mysql-forge.sql.bz2- SSH into the server
ssh forge@staging.ixdf.dev - Extract and import the dump
bash
bunzip2 < /tmp/mysql-forge.sql.bz2 | mysql -h 127.0.0.1 -P 3306 -u forge -pforge forgeImportant files
LetsEncrypt
You can either restore LetsEncrypt files from /etc/letsencrypt directory or follow the SSL Configuration Guide to generate a new certificate.
nginx
You can find all nginx configuration under /etc/nginx directory. You can use scp to move the files to the server & reload the nginx.
PHP
All PHP configuration are under /etc/php directory.
Supervisor
Use scp to move supervisor configuration from /etc/supervisor to the remote host.