Skip to main content

Backup

This extension allows you to create complete backups of your ClientXCMS installation, including files and database, and store them on various storage providers.

Extension Configuration

After installing the extension, you can configure backup providers in the admin panel under Settings > Security > Backup Providers.

You can add multiple providers by clicking the Create button. Select the desired provider type (Local, FTP/SFTP, S3, Google Drive) and fill in the required information according to the chosen type.

You can also define a frequency in hours for automatic backups and the maximum number of backups to keep per provider.

img

Backup Details by Provider

You can view backups made for each provider by clicking the View button next to each provider in the list. This will display the provider configuration as well as the list of stored backups and any errors during backup attempts.

img

Backup Management

You can manage backups in the admin panel under Settings > Security > Backups. img

Here, you can see all backups made, their size, creation date, and the provider used. You can also download or delete individual backups.

Restoring a Backup

To restore a backup, click the Restore button next to the desired backup. Confirm the action and the restoration will begin. Note that restoration will overwrite current data, so it is recommended to make a backup before proceeding.

Running a Backup Manually

You can run a backup manually by clicking the Run Backup button at the bottom right of the backups page. This will create a new backup immediately and send it to the selected provider.

Backup Formats

Backups are created in compressed .zip format, including the database dump as well as files in the storage directory. A backup.json file is included in the archive, containing backup metadata:

{
"uuid": "efa5e9ac-d0db-4c02-81f1-d6f41f9a4902",
"type": "full",
"created_at": "2025-12-20T19:51:51+01:00",
"app_key": "app_XXXXXXXXXXXXXXXX", # used for backup restoration
"app_url": "test",
"includes_database": true,
"includes_storage": true,
"database_connection": "mysql",
"filename": "backup-efa5e9ac-d0db-4c02-81f1-d6f41f9a4902.zip"
}

Backup Verification

The addon also adds a widget to the admin dashboard to check the backup status. It displays the date of the last successful backup and alerts if a backup is overdue based on the configured frequency. img

Commands

You can execute the backup task with the command: php artisan backup:run --force

The force option allows forcing execution even if the time between two backups has not yet elapsed.

Backup Provider Configuration

Important Concepts: Root vs Sub-folder

Before configuring a provider, it is crucial to understand the difference between these two settings:

  • Root Path: This is the base folder on your remote server (e.g., / or /var/backups).
  • Sub-folder: This is the subfolder inside the root where files will be stored. By default, it is set to backups.
    • Tip: If you want to backup exactly to the location defined by the "Root Path", leave the "Sub-folder" empty.

Local (Storage on Current Server)

Useful for temporary backups or if you then manually synchronize the folder.

  • Root Path: The absolute path on your server (e.g., /var/www/clientxcms/storage/backups). Default: storage/backups.
  • Sub-folder: The subfolder in this path (e.g., storage).