Overview
This guide walks you through creating your first backup with Borg UI, from setting up a repository to monitoring backup progress in real-time.Prerequisites
Before starting, ensure you have:- Borg UI installed and running
- Access to the web interface (default:
http://localhost:8081) - Default credentials:
admin/admin123 - A directory to store backups (local or remote)
For production use, change the default password immediately after first login.
Step 1: Create a Repository
A repository is where Borg stores your encrypted and deduplicated backup archives.Navigate to Repositories
Click Repositories in the sidebar to access the repository management page.
Configure Repository Settings
Fill in the following fields:
- Repository Name: A friendly name (e.g., “Home Server Backups”)
- Path: Where to store the repository
- Local:
/data/backups/my-repo(inside container) - Host filesystem:
/local/backups/my-repo(maps to host)
- Local:
- Encryption: Choose encryption mode
repokey: Key stored in repository (recommended)keyfile: Key stored separately (more secure)none: No encryption (not recommended)
- Passphrase: Required for encrypted repositories
- Compression: Choose compression algorithm
lz4: Fast, moderate compression (recommended)zstd: Balanced speed and compressionzlib: Higher compression, slowerlzma: Maximum compression, slowest
Add Exclude Patterns (Optional)
Exclude files you don’t want to back up:
Exclude patterns support wildcards and follow Borg’s pattern syntax.
Step 2: Run Your First Backup
Once the repository is created, you can start backing up your data.Navigate to the Repository
From the Repositories page, click on your newly created repository to view its details.
Start Manual Backup
Click the Backup Now button to start an immediate backup.The backup job is created with status “pending” and begins executing in the background.
Monitor Progress
Borg UI displays real-time progress including:
- Current file: Path of the file being processed
- Backup speed: Transfer rate in MB/s
- Files processed: Number of files backed up
- Data statistics:
- Original size: Uncompressed data size
- Compressed size: After compression
- Deduplicated size: Actual space used (after deduplication)
- Progress percentage: Overall completion
- Estimated time remaining: Based on current speed
Understanding Backup Progress
Borg UI parses Borg’s JSON output to provide real-time feedback:Pre/Post Backup Hooks
You can run scripts before and after backups to automate tasks like stopping services or creating database dumps.- Pre-Backup Script
- Post-Backup Script
Runs before backup starts. Use for:
- Stopping Docker containers
- Creating database dumps
- Flushing caches
Adding Hooks to Repository
- Edit your repository settings
- Scroll to Backup Hooks section
- Enter your script in Pre-Backup Script or Post-Backup Script
- Set Hook Timeout (default: 300 seconds)
- Enable Continue on hook failure if desired
- Save changes
Hooks run inside the Borg UI container. Use
/local/ paths to access host files and Docker socket mounting to control containers.Viewing Archives
After your first backup completes, you can browse the archive:- Navigate to the repository details page
- Click the Archives tab
- See your newly created archive with timestamp
- Click Browse to explore files in the archive
- Use the file browser to navigate and verify your backup
Next Steps
Schedule Backups
Automate backups with cron schedules
Restore Files
Learn how to restore files from archives
Remote Repositories
Set up SSH/SFTP remote backup storage
Backup Scripts
Advanced hook scripts and automation
Troubleshooting
Backup Fails with Permission Denied
If backing up files outside the container:Repository Already Exists
If the path already contains a Borg repository, use Import Repository instead of Create Repository to add it to Borg UI.Slow Initial Backup
First backups are always slower because:- All data must be processed and uploaded
- Compression and encryption add overhead
- Deduplication builds the initial chunk database