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.

  1. Use Faspex Utility to back up the database, see Backing up the database for detailed instructions.
  2. 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
    You can use this simple command to copy all these files to a backup folder:
    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.

  1. Perform a full Back up your Faspex instance.
  2. Reinstall Faspex or install Faspex on a new server following the steps in Installing Faspex for the first time.
  3. 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 of FASPEX_CORE_SECRET, FASPEX_CORE_OLD_SECRET, FASPEX_CORE_UI_CLIENT_ID, and FASPEX_SERVICE_CLIENT_ID to 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/
  4. Run faspexctl setup to restart Faspex with the restored configuration.
  5. Restore the Faspex database:
    1. Copy database backup files into /opt/aspera/faspex/data/db_backups.
    2. Restore the database using the Faspex utility application. See Restoring the database for detailed instructions.
  6. In the Faspex Utility application, migrate the Core and Service databases to the latest schemas.