Scheduled backups run automatically on a configured interval. The Laravel scheduler triggers backup jobs which are handed off to the agent. No manual intervention is needed once a schedule is configured.
Configuring the global backup schedule
Global settings apply to all accounts unless overridden per-account.
- Log in and switch to Server Mode.
- Navigate to Settings → Backups.
- Set the following:
| Setting | Options |
|---|---|
| Schedule | Daily, Weekly |
| Time of day | Hour and minute (server local time) |
| Backup type | Full, Files only, Databases only, Email only |
| Storage destination | Local disk, S3, Backblaze B2, SFTP |
| Retention | Keep last N backups (older ones auto-deleted) |
- Click Save. The scheduler picks up the new settings on the next minute tick.
Per-account schedule overrides
To set a different schedule for a specific account:
- Server Mode → Accounts → select account → Backups → Schedule.
- Toggle Override global schedule and configure the account-specific settings.
- Save.
This is useful when a high-traffic account needs more frequent backups than the rest of the server, or when a specific account has its own remote storage bucket.
Storage driver configuration
Amazon S3
Driver: S3
Bucket: your-bucket-name
Region: us-east-1
Access Key ID: AKIA...
Secret Access Key: ...
Path prefix: opterius-backups/ (optional)
The IAM user needs s3:PutObject, s3:GetObject, s3:DeleteObject, and s3:ListBucket on the target bucket.
Backblaze B2
Driver: Backblaze B2
Key ID: 001abc...
Application Key: K001...
Bucket Name: your-bucket-name
B2 is S3-compatible. Opterius uses the S3-compatible API endpoint. Generate application keys scoped to a single bucket for best security.
SFTP remote
Driver: SFTP
Host: backup.yourdomain.com
Port: 22
Username: backupuser
Private Key: (paste contents of ~/.ssh/id_ed25519)
Remote Path: /backups/opterius/
[!NOTE] Use a dedicated SSH key pair for backup SFTP access. Do not reuse your personal server admin key.
Retention policy
Set Keep last N backups to a number that fits your storage budget. When a new backup completes successfully, the agent counts existing backups for that account and deletes the oldest ones beyond the retention limit.
Recommended retention values:
| Schedule | Recommended N |
|---|---|
| Daily | 7–14 |
| Weekly | 4–8 |
On-demand backups are never counted toward the retention limit and are never auto-deleted.
How the scheduler works
The Laravel scheduler runs via a system cron entry installed during setup:
* * * * * www-data php /opt/opterius/artisan schedule:run >> /dev/null 2>&1
At the configured time, schedule:run dispatches a backup job to the queue. The queue worker (opterius-queue.service) picks up the job and calls the agent's backup endpoint. If the queue worker is not running, backups will not execute.
Verify the queue worker is running:
systemctl status opterius-queue
Restart if needed:
systemctl restart opterius-queue
Verifying backups ran
After the first scheduled run:
- Server Mode → Accounts → [account] → Backups. The backup should appear in the list with a timestamp matching the configured schedule time.
- Check the agent log for any errors:
tail -n 100 /opt/opterius-agent/logs/agent.log
[!TIP] Store backups off-server (S3 or Backblaze B2). Local disk backups are lost if the server disk fails or the server is compromised. Off-server storage is the only true disaster recovery copy.