Backup and restoration

Taking periodic backups of a web-based software is essential to ensure that in case of unexpected issues, such as server crashes, cyberattacks, or data corruption, you can quickly restore the system and minimize downtime.

Main parts of the backup process

To take a full backup, you need to complete two steps:

  1. Backup the files
  2. Backup the database

Backup the files

Follow the steps below to back up the files:

  1. Create a new directory named backups in a suitable location for storing backup files. This directory can serve as a centralized location for all your backups.

    Backups directory

  2. For each backup, create a new directory within the backups directory. Name the directory according to one of the following conventions:
    1. With date only: [software_name]__backup__[date]

      Example: appskull_app__backup__2025_01_15

      Backup main directory date only name

    2. With date and time: [software_name]__backup__[date]__[time]

      Example: appskull_app__backup__2025_01_15__18_55_37

      Backup main directory with date and time name

  3. Create two new directories named files and database within that directory.

    Files and database directories in main backup directory

  4. Copy all files and directories, excluding the vendor directory, into the files directory.

    Files in the files directory

  5. Delete all directories in the [app_root]\public\assets\nudasoft directory that were originally symbolic link directories, if any exist.

    Delete symbolic directories

  6. You can optionally delete all the cache files located in the cache directory within the writable directory.
  7. You can optionally delete all session files located in the session directory within the writable directory.

Backup the database

Follow the steps below to back up the database:

  1. If multiple databases already exist, you need to correctly identify the specific database that needs to be backed up.

    Select the database

  2. Take a .sql database backup using terminal commands or database management software, such as PostgreSQL pgAdmin 4.

    Backup database

  3. After taking the .sql database backup file, place that file in the database directory that was created earlier.

    Database file in the database directory

Complete the backup

To complete the backup, simply zip/archive the main backup directory and store it somewhere safe.

Backup archive file

Testing backups

While creating backups is essential for data protection, testing them verifies that the backup files are complete, functional, and can be restored successfully when needed. Without testing, there is a risk that your backups may be corrupted, incomplete, or otherwise unusable, leaving you vulnerable to data loss in case of system failure or disasters.

Regularly testing backups helps identify any potential issues in the backup process, such as missing files, incorrect configurations, or compatibility problems. It also gives you the confidence that the recovery process will work smoothly and that you can quickly restore your system to full functionality when necessary.

Backup restoration

Restoration is similar to the installation process. Once you have all the files and the database, you can upload them back to the server and restore your database. Make sure to run the necessary installation commands, such as those for install Composer packages.

If you haven't changed your hosting or domain configurations, no further configuration is needed. However, if you have changed any hosting or domain settings, update the old configuration values with the new ones. If you're unsure about these changes, refer to the Installation chapter, which contains all the information you need.

Copyright © Nudasoft.