# Quickstart ## Overview Five steps from this folder to the first backup. Detailed explanations are in [02_INTEGRATION](02_INTEGRATION.md) and [03_CONFIG_REFERENCE](03_CONFIG_REFERENCE.md). Relevant files: - `manage-client/` – the folder that gets copied into the project - `manage-client/config.sample.php` – template for the configuration - `manage-client/bin/manage-client.php` – command line - `manage-client/ui/panel.php` – ready-made UI for the admin area Requirements: PHP 8.0 or newer, the `zip` extension (for updates), write access to the project's data directory. Neither Composer nor a build step is needed. ## 1. Copy the folder ```bash cp -r manage-client /path/to/project/manage-client ``` The folder usually sits directly in the project root, next to `index.php`. If it lives elsewhere, `MANAGE_APP_ROOT` needs to be adjusted. ## 2. Create an instance on the server In the Manage server, under **Instances**, create a new instance. Right after that, the token is shown **once** — together with a ready-made configuration block to copy. After that the token can no longer be retrieved; it can only be regenerated. ## 3. Create the configuration ```bash cd /path/to/project/manage-client cp config.sample.php config.php ``` Enter at least these values: ```php define("MANAGE_SERVER_URL", "https://manage.example.org"); define("MANAGE_INSTANCE", "my-project-prod"); define("MANAGE_TOKEN", "…"); ``` Then decide what should be backed up: ```php define("MANAGE_BACKUP_SOURCES", [ ["as" => "data", "glob" => "data/*.json"], ["as" => "data/uploads", "dir" => "data/uploads"], ]); ``` `config.php` does **not** belong in the project's repository. See [10_SECURITY](10_SECURITY.md). ## 4. Check the connection ```bash php manage-client/bin/manage-client.php status ``` Expected output (the command's actual output stays in German; shown here with an English gloss on the right): ```text Instanz: my-project-prod # Instance: Server: https://manage.example.org Konfiguriert: ja # Configured: yes Installierte Ver.: v1.0.0 # Installed version: Aktuelles Release: v1.0.0 # Current release: Update verfügbar: nein # Update available: no Lokale Backups: 0 # Local backups: ``` If it shows `Konfiguriert: NEIN` ("Configured: NO") or an error appears, [09_TROUBLESHOOTING](09_TROUBLESHOOTING.md) helps. ## 5. First backup ```bash php manage-client/bin/manage-client.php backup ``` The archive then sits locally under `data/manage/backups/` and is visible in the Manage server under **Backups**. ## Next - Add the UI to the admin area: [02_INTEGRATION](02_INTEGRATION.md) - Regular backups via cron: [02_INTEGRATION](02_INTEGRATION.md) - Building release packages correctly: [06_UPDATE_PACKAGING](06_UPDATE_PACKAGING.md)