Josef Straßl b7e6f44187 adding backup-server functionality há 1 mês atrás
..
backups b7e6f44187 adding backup-server functionality há 1 mês atrás
.htaccess b7e6f44187 adding backup-server functionality há 1 mês atrás
README.md b7e6f44187 adding backup-server functionality há 1 mês atrás
config.sample.php b7e6f44187 adding backup-server functionality há 1 mês atrás
index.php b7e6f44187 adding backup-server functionality há 1 mês atrás
manage.php b7e6f44187 adding backup-server functionality há 1 mês atrás
upload.php b7e6f44187 adding backup-server functionality há 1 mês atrás

README.md

PSA Orderform Backup Server

This folder can be deployed as a central backup server for distributed PSA orderform instances.

Setup

  1. Copy config.sample.php to config.php.
  2. Change BACKUP_SERVER_PASSWORD.
  3. Ensure the backups/ directory is writable by PHP.
  4. Open index.php or manage.php and log in with the configured password.
  5. Add every allowed distributed instance in the management UI.

The upload endpoint is upload.php. It intentionally does not require authentication, but every upload must include an instance identifier that was added in the management UI.

Client target

Configure a distributed instance with a managed backup target:

define('BACKUP_REMOTE_TARGETS', [
    [
        'name' => 'Managed Backup Server',
        'type' => 'managed',
        'url' => 'https://backup.example.org/upload.php',
        'instance' => 'stadt-freising-prod',
    ],
]);

url must point directly to upload.php. instance may contain letters, numbers, dots, underscores, and dashes.

Retention

The server retains the latest backups per instance. The default is 30.

Retention can be changed in config.php with BACKUP_SERVER_RETENTION and in the management UI. The UI value is stored in backups/settings.json and takes precedence after it has been saved once.

Retention is applied after every successful upload and after retention changes in the management UI.

Storage

Backups are stored under:

backups/<instance>/backup-YYYYmmdd-HHMMSS.zip

Metadata is stored in:

backups/index.json

Allowed instances and UI retention settings are stored in:

backups/settings.json

With the included .htaccess, ZIP and JSON files are not directly readable through Apache. Downloads should use the authenticated management UI.