Every backup strategy benefits from geographic diversity—storing copies in a separate location from the original data. Nextcloud, with its standard WebDAV endpoint, is an excellent backup target. It's S3-backed for durability, EU-hosted for compliance, and accessible from any platform.
This guide shows how to automate backups to Nextcloud from common environments.
Why Use Nextcloud for Backups?
- Standard protocol: WebDAV is supported by every major OS and backup tool
- S3-backed durability: DanubeData Storage Share uses S3 object storage behind the scenes
- EU data residency: Backups stay in Germany (GDPR-compliant)
- Access control: Create dedicated backup users with restricted folder access
- Cost-effective: 1 TB for €4.99/mo, 5 TB for €14.99/mo
Prerequisites
- A DanubeData Storage Share instance (create one here)
- A Nextcloud user account for backups (recommended: create a dedicated
backupuser) - Your instance URL:
https://your-subdomain.storage.danubedata.ro
Create a Dedicated Backup User
- Log in to your Nextcloud admin panel
- Go to Users and create a new user called
backup - Set a strong password
- Create a
/Backupsfolder and share it with the backup user
The WebDAV endpoint for this user will be:
https://your-subdomain.storage.danubedata.ro/remote.php/dav/files/backup/
Linux Server Backups with rclone
rclone is the Swiss Army knife of cloud storage. It supports WebDAV natively and handles retries, checksums, and bandwidth limiting.
Install rclone
curl https://rclone.org/install.sh | sudo bash
Configure the Remote
# Create rclone config
cat >> ~/.config/rclone/rclone.conf << 'EOF'
[nextcloud]
type = webdav
url = https://your-subdomain.storage.danubedata.ro/remote.php/dav/files/backup/
vendor = nextcloud
user = backup
pass = YOUR_ENCRYPTED_PASSWORD
EOF
# Or use interactive config:
rclone config
Backup Script
#!/bin/bash
# /opt/backup-to-nextcloud.sh
set -e
DATE=$(date +%Y-%m-%d)
BACKUP_DIR="/tmp/backup-$DATE"
# Create backup archive
mkdir -p "$BACKUP_DIR"
# Backup database
mysqldump -u root --all-databases | gzip > "$BACKUP_DIR/databases.sql.gz"
# Backup configuration files
tar czf "$BACKUP_DIR/etc-config.tar.gz" /etc/nginx /etc/systemd/system/*.service
# Backup application data
tar czf "$BACKUP_DIR/app-data.tar.gz" /var/www/html
# Sync to Nextcloud
rclone sync "$BACKUP_DIR" nextcloud:Backups/$DATE/ --progress
# Clean up local temp files
rm -rf "$BACKUP_DIR"
# Remove backups older than 30 days from Nextcloud
rclone delete nextcloud:Backups/ --min-age 30d
echo "Backup completed: $DATE"
# Make executable and schedule
chmod +x /opt/backup-to-nextcloud.sh
# Run daily at 2 AM
(crontab -l 2>/dev/null; echo "0 2 * * * /opt/backup-to-nextcloud.sh >> /var/log/nextcloud-backup.log 2>&1") | crontab -
macOS Backups
Mount as Network Drive
- Open Finder
- Press Cmd+K (Connect to Server)
- Enter:
https://your-subdomain.storage.danubedata.ro/remote.php/dav/files/backup/ - Enter your backup user credentials
The Nextcloud storage appears as a network drive. Use any backup tool (Time Machine alternative, rsync, or Arq) to write to this location.
Automated with rsync
# Install rclone via Homebrew
brew install rclone
# After configuring rclone (see Linux section above):
rclone sync ~/Documents nextcloud:Backups/MacBook/Documents/ --progress
rclone sync ~/Desktop nextcloud:Backups/MacBook/Desktop/ --progress
Windows Backups
Map as Network Drive
- Open File Explorer
- Right-click This PC > Map network drive
- Enter:
https://your-subdomain.storage.danubedata.ro/remote.php/dav/files/backup/ - Check "Connect using different credentials" and enter backup user credentials
Once mapped, use Windows Backup, robocopy, or any backup software to write to the mapped drive.
Automated with robocopy
:: backup.bat - Run via Task Scheduler
robocopy "C:UsersYourUserDocuments" "Z:BackupsWindowsDocuments" /MIR /R:3 /W:10 /LOG:C:Logsackup.log
Docker Volume Backups
Back up Docker volumes to Nextcloud using rclone in a container:
# docker-compose.yml addition
services:
backup:
image: rclone/rclone:latest
volumes:
- app-data:/data/app:ro
- db-data:/data/db:ro
- ./rclone.conf:/config/rclone/rclone.conf:ro
- ./backup.sh:/backup.sh:ro
entrypoint: /bin/sh
command: /backup.sh
profiles:
- backup
# Run backup manually
docker compose run --rm backup
# Or schedule via cron on the host
0 3 * * * cd /opt/myapp && docker compose run --rm backup
Nextcloud Desktop Client Sync
The simplest backup method for end users: install the Nextcloud desktop client and configure it to sync specific folders. Changes are backed up automatically.
- Download the Nextcloud desktop client
- Connect to your instance URL
- Choose folders to sync
- Files sync automatically in the background
Backup Best Practices
| Practice | Recommendation |
|---|---|
| Dedicated user | Create a separate Nextcloud user for backups |
| Encryption | Encrypt sensitive backups before uploading (gpg or age) |
| Retention | Automatically delete old backups (rclone --min-age) |
| Verification | Periodically download and test restoring a backup |
| Monitoring | Check backup logs and alert on failures |
| Bandwidth | Use rclone --bwlimit to avoid saturating your connection |
Storage Plans for Backups
| Plan | Storage | Best For | Price |
|---|---|---|---|
| Sulina | 1 TB | Personal backups, small projects | €4.99/mo |
| Sf. Gheorghe | 5 TB | Team backups, multiple servers | €14.99/mo |
| Chilia | 10 TB | Organization-wide backup, media archives | €29.99/mo |
Get Started
Nextcloud's WebDAV endpoint turns any managed instance into a reliable, EU-hosted backup target. Combined with rclone or native OS tools, you get automated offsite backups with minimal setup.
Create your DanubeData account and deploy a Storage Share instance for your backups. Plans start at €4.99/month for 1 TB.