-
-
Notifications
You must be signed in to change notification settings - Fork 4
Repositories
A repository is a BorgBackup storage location that holds deduplicated, compressed backup archives. Each repository belongs to a specific client and contains one or more backup archives (recovery points).
Repositories can be stored in two locations:
- Local: On the BBS server's filesystem (default)
- Remote SSH: On a remote SSH host like rsync.net, BorgBase, or Hetzner Storage Box (see Remote Storage)
BorgBackup repositories provide:
- Deduplication: Only unique data blocks are stored, dramatically reducing storage requirements
- Compression: Data is compressed using LZ4, zlib, or zstd algorithms
- Encryption: Strong AES-256 encryption with authenticated encryption modes
- Incremental backups: Only changed data is transferred and stored
- Atomic transactions: Backups are either complete or not recorded (no partial backups)
Each client can have multiple repositories, allowing you to organize backups by purpose (e.g., "System Files", "Databases", "User Data").
To create a new repository:
- Navigate to the client detail page
- Click the Repositories tab
- Click Create Repository
- Configure the repository settings
Choose where the repository will be stored:
- Local (this server): Repository is created on the BBS server's local disk. This is the default.
- Remote SSH: Repository is created on a remote SSH host. This option only appears if you have configured at least one remote host in Settings → Remote Storage.
When Remote SSH is selected, a Remote Host dropdown appears where you select the target host.
A descriptive name for the repository (e.g., "System Backup", "Database Archives", "Web Content").
The repository name is used in the storage path, so choose a name that is:
- Descriptive and meaningful
- Filesystem-safe (avoid special characters)
- Unique within the client
BBS supports three BorgBackup encryption modes:
repokey-blake2 (Recommended)
- Repository is encrypted with AES-256
- Encryption key is stored inside the repository
- Protected by a passphrase
- Best for most use cases
keyfile-blake2
- Repository is encrypted with AES-256
- Encryption key is stored separately from the repository
- Protected by a passphrase
- Use when you want the key stored outside the repository for additional security
none
- No encryption
- NOT recommended except for non-sensitive data in trusted environments
For production use, always choose repokey-blake2 unless you have specific requirements for separate key storage.
For encrypted repositories, you must provide a passphrase:
- Must be strong (recommended: 20+ characters, mix of letters, numbers, symbols)
- BBS encrypts the passphrase using the application's
APP_KEYbefore storing it in the database - The agent uses this passphrase automatically for all borg operations
- Important: If you lose both the passphrase AND the BBS database, your backups cannot be recovered
Best Practice: Export and securely store the repository key and passphrase in a password manager or secure vault, separate from the BBS server.
Local repositories are stored on the BBS server filesystem at:
{storage_location_path}/{agent_id}/{repo_name}/
Where:
-
{storage_location_path}is the path of the assigned storage location (default:/var/bbs/home). See Storage Setup for configuring multiple storage locations. -
{agent_id}is the unique numeric ID of the client -
{repo_name}is the repository name you specified
When creating a local repository, you can choose which storage location to use if multiple locations are configured. This allows you to spread repositories across different disks, NFS mounts, or other storage backends.
Remote SSH repositories are stored on an external SSH host at:
ssh://user@host:port/base_path/repo_name
No data is stored on the BBS server. See Remote Storage for full setup and provider guides.
Each client has a dedicated Unix user account on the BBS server (named bbs-{agent-id}). This user:
- Is restricted to execute ONLY
borg servecommands via SSH forced commands - Cannot access any files outside its own repositories
- Cannot execute shell commands or access other clients' data
- Uses SSH key authentication (no password login)
This security model ensures complete isolation between clients, even though they share the same physical server.
The Repositories tab on the client detail page displays key metrics for each repository:
- Size: Total storage used (after deduplication and compression)
- Archives: Number of backup archives (recovery points)
- Last Backup: Timestamp of the most recent successful backup
- Oldest Archive: Date of the oldest retained backup
These metrics are updated automatically after each backup, prune, or compact operation.
Click on any repository to view its detail page. The detail page shows:
- Size — Total repository size on disk
- Archives — Number of archives in the repository
- Oldest — Date of the oldest archive
- Latest — Relative time since the newest archive (e.g., "2 hours ago")
- Active Job — Badge shown if a job is currently running on this repository
- Encryption — Encryption method used
- Borg Version (created) — Version of Borg that initialized the repository
- Borg Version (last used) — Most recent Borg version used
- Created — Repository creation timestamp
- Backup Plans — Number of plans using this repository
A table of the most recent jobs for this repository, showing time, type, status, and duration. Click any job to view its detail page.
The repository detail page provides four maintenance operations. All operations are queued as jobs and can be monitored on the Queue page. Maintenance buttons are disabled while a job is actively running on the repository.
Verifies repository integrity by checking all archives for corruption or data errors. Safe to run at any time.
- Open the repository detail page
- Click Run Check
- Monitor the job on the Queue page
When to use: Run periodically (monthly) or after any suspected disk issues. Check reports whether the repository and all archives are intact.
Reclaims disk space by removing unused data chunks left behind after pruning archives.
- Open the repository detail page
- Click Run Compact
- Monitor the job on the Queue page
When to use: After heavy pruning, or to free up disk space. BBS also runs compact automatically every Saturday at 2:00 AM if auto-compact is enabled in Settings > General.
Attempts to fix repository errors found by a check operation. Use with caution — repair may delete damaged data to restore consistency.
- Open the repository detail page
- Click Run Repair
- Confirm the dangerous action
- Monitor the job on the Queue page
When to use: Only after a check operation reports errors. Do not use as a preventive measure.
Forcibly removes stale locks from interrupted operations.
- Open the repository detail page
- Click Break Lock
- Confirm the dangerous action
When to use: Only if you're certain no backup operations are currently running and a previous operation left a stale lock. Borg locks prevent concurrent access — breaking a lock while an operation is in progress can corrupt the repository.
Each repository can be individually configured to mirror to S3-compatible storage for offsite protection.
- Open the repository detail page
- In the S3 Offsite Mirror section, select an S3 configuration from the dropdown
- Click Enable S3 Sync
S3 configurations are created on the Plugins page or in Settings > S3 Backups. Once enabled, the repository will automatically sync to S3 after each prune operation.
When S3 sync is enabled, the repository detail page shows:
- The S3 configuration being used
- The timestamp of the last successful sync (or "Never" if not yet synced)
Click Disable on the S3 Offsite Mirror section. This stops future syncs but does not delete data already in S3.
If local repository data is lost or corrupted, you can restore from S3. Two restore modes are available:
Downloads data from S3 and overwrites the local repository. Use this when the local copy is damaged.
- Click Restore (replace) in the S3 Offsite Mirror section
- Confirm the dangerous action
- Monitor the restore job on the Queue page
Downloads data from S3 into a new repository. Use this to recover data without disturbing the existing local copy.
- Click Restore (copy)
- Enter a name for the new repository (defaults to
{name}-copy) - Confirm the action
- Monitor the restore job on the Queue page
If a repository exists in S3 but not locally (e.g., after a server rebuild), BBS can detect these "orphaned" repositories on the client's Repos tab and offer to restore them.
See S3-Offsite-Sync for full S3 setup, configuration, and disaster recovery documentation.
Warning: Deleting a repository permanently destroys all backup archives and data. This cannot be undone.
To delete a repository (admin only):
- Open the repository detail page
- Scroll to the Danger Zone section
- Click Delete Repository
- If S3 sync is enabled, optionally check "Also delete from S3 offsite storage"
- Confirm the deletion
Deletion is blocked if:
- Any backup plans still reference this repository (remove or reassign them first)
- An active job is running on this repository
Use clear, descriptive names that indicate the backup content:
- Good: "web-server-files", "mysql-databases", "user-home-directories"
- Avoid: "backup1", "repo", "test"
Always use encryption for production data. Use repokey-blake2 unless you have specific requirements for keyfile-blake2.
- Use a strong, unique passphrase for each repository
- Store passphrases in a secure password manager
- Export and back up repository keys separately from BBS
- Never use the same passphrase for multiple repositories
- Create separate repositories for different data types (files, databases, etc.)
- Use separate repositories for different retention requirements
- Consider creating separate repositories for critical vs. non-critical data
- Check: Run monthly, or after any suspected disk issues
- Compact: Runs automatically weekly (Saturday 2 AM). Manual runs after heavy pruning.
- Repair: Only after check reports errors
- Break Lock: Only if a stale lock is confirmed
- Regularly check repository size to ensure adequate disk space
- Monitor archive counts to verify retention policies are working correctly
- Review the "Last Backup" timestamp to catch missed or failed backups
- Enable Notifications for Storage Low alerts
Next: Backup-Plans | Restoring-Files | Remote-Storage | S3-Offsite-Sync
📖 User Manual
Getting Started
Using BBS
- Dashboard
- Managing Clients
- Linux Agent Setup
- macOS Agent Setup
- Windows Agent Setup
- Repositories
- Storage Setup
- Backup Plans
- Restoring Files
- Database Backups
- Plugins
- Remote Storage
- S3 Offsite Sync
Monitoring
Administration
Reference