Backup and restore
Information related to backing up and restoring Faspex 5 from a backup.
Back up your Faspex instance
With a backup, you can reinstall Faspex without losing data or migrate the Faspex instance to another server.
- Use Faspex Utility to back up the database, see Backing up the database for detailed instructions.
- Back up your Faspex database backups and your Faspex configuration files:
The database backups are stored at /opt/aspera/faspex/data/db_backups.
The configuration files are at:
- Docker environment files: /opt/aspera/faspex/conf/docker
- Database configuration files: /opt/aspera/faspex/conf/db
- Nginx configuration files: /opt/aspera/faspex/conf/nginx
- Docker-compose files: /opt/aspera/faspex/conf/docker_compose_templates
- Secret files: /opt/aspera/faspex/conf/secrets
mkdir -p faspex_backup/conf/docker; mkdir -p faspex_backup/data; cp /opt/aspera/faspex/conf/docker/*.env faspex_backup/conf/docker; cp -r /opt/aspera/faspex/conf/db /opt/aspera/faspex/conf/nginx /opt/aspera/faspex/conf/docker_compose_templates faspex_backup/conf/; cp -r /opt/aspera/faspex/data/db_backups faspex_backup/data/
Restore or migrate a Faspex instance from backups
This process explains how to restore or migrate Faspex to another server.
- Perform a full Back up your Faspex instance.
- Reinstall Faspex or install Faspex on a new server following the steps in Installing Faspex for the first time.
- Restore configuration files from the previous instance.
The configuration files are at:
- Docker environment files: /opt/aspera/faspex/conf/docker
- Database configuration files: /opt/aspera/faspex/conf/db
- Nginx configuration files: /opt/aspera/faspex/conf/nginx
- Docker-compose files: /opt/aspera/faspex/conf/docker_compose_templates
- Secret files: /opt/aspera/faspex/conf/secrets
Important: Faspex requires the values ofFASPEX_CORE_SECRET,FASPEX_CORE_OLD_SECRET,FASPEX_CORE_UI_CLIENT_ID, andFASPEX_SERVICE_CLIENT_IDto match the values set in the database. Make sure you use the values matching those in your database backup.Tip: If you used the sample command from Back up your Faspex instance, you can run this command to copy all backed up files to their correct locations:cp faspex_backup/conf/docker/*.env /opt/aspera/faspex/conf/docker/; cp faspex_backup/conf/db/* /opt/aspera/faspex/conf/db; cp faspex_backup/conf/nginx/* /opt/aspera/faspex/conf/nginx/; cp faspex_backup/conf/docker_compose_templates/* /opt/aspera/faspex/conf/docker_compose_templates/ - Run faspexctl setup to restart Faspex with the restored configuration.
- Restore the Faspex database:
- Copy database backup files into /opt/aspera/faspex/data/db_backups.
- Restore the database using the Faspex utility application. See Restoring the database for detailed instructions.
- In the Faspex Utility application, migrate the Core and Service databases to the latest schemas.