# Nextcloud Backup Configuration # Copy this file to /opt/nextcloud-backup/.env and fill in your values # ============================================================================ # NEXTCLOUD CONFIGURATION # ============================================================================ # Path to docker-compose directory (where Nextcloud is running) # Examples: /opt/nextcloud, /srv/docker/nextcloud, etc. NEXTCLOUD_COMPOSE_DIR=/srv/docker/nextcloud # Full path to Nextcloud data directory # This is where user files are stored NEXTCLOUD_DATA_PATH=/srv/docker/nextcloud/data # Database configuration # Get these values from your docker-compose.yml or .env file NEXTCLOUD_DB_NAME=nextcloud NEXTCLOUD_DB_USER=nextcloud NEXTCLOUD_DB_PASSWORD=your_database_password_here NEXTCLOUD_CONTAINER=nextcloud # ============================================================================ # BACKUP CONFIGURATION # ============================================================================ # How many days to keep backups # Older backups will be automatically deleted BACKUP_RETENTION_DAYS=30 # Compression algorithm # Options: zstd (recommended, fastest), gzip, bzip2 COMPRESSION=zstd # Directory to store local backup metadata and logs # Make sure there's enough space for logs BACKUP_DIR=/opt/nextcloud-backup/.backups # Temporary directory for assembling backups before upload # Needs enough space for a full database + file archive # Typically removed after upload TEMP_DIR=/tmp/nextcloud-backup # ============================================================================ # BACKUP STRATEGY # ============================================================================ # Backup type for scheduled backups # Options: incremental (daily, faster) or full (slower, complete snapshot) # Default: incremental (recommended) BACKUP_TYPE=incremental # Perform test/dry-run (no actual upload) # Set to 'true' for testing, 'false' for actual backups DRY_RUN=false # ============================================================================ # LOGGING & MONITORING # ============================================================================ # Log level: DEBUG, INFO, WARN, ERROR LOG_LEVEL=INFO # Path to log files LOG_DIR=${BACKUP_DIR}/logs # Send alerts on failure (requires mail system configured) # Set to your email address to receive failure notifications ALERT_EMAIL=admin@example.com # ============================================================================ # SCHEDULING (only used by systemd timer) # ============================================================================ # Time for daily backup (24-hour format) # Examples: 02:00:00 (2 AM), 14:30:00 (2:30 PM) BACKUP_TIME=02:00:00 # Optional: Weekly full backup schedule # Format: 'Sun' or 'Mon' etc., leave empty for daily incremental only FULL_BACKUP_DAY=Sunday