-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Right now, the start.sh script creates the backupfolder file in /var/urbackup and populates it with the path to the /media directory (which is mapped into the container) in the following code:
arch-urbackup/run/nobody/start.sh
Lines 14 to 15 in 16f5d11
| # set default location for backup storage to /media | |
| echo "/media" > /var/urbackup/backupfolder |
Some urbackup features also rely on this path being set in /etc/urbackup/backupfolder. In particular, in order to enable btrfs snapshots in urbackup, the backup path must be set in /etc/urbackup/backupfolder as described here (quoted below):
In order to create and remove btrfs snapshots UrBackup installs a setuid executable
urbackup_ snapshot_helper. UrBackup also uses this tool to test if cross-device reflinks are possible. Only if UrBackup can create cross-device reflinks and is able to create and destroy btrfs snapshots, is the btrfs mode enabled.urbackup_snapshot_helperneeds to be told separately where the UrBackup backup folder is. This path is read from/etc/urbackup/backupfolder. Thus, if/media/backup/urbackupis the folder where UrBackup is saving the paths, following commands would properly create this file:
mkdir /etc/urbackup
echo "/media/backup/urbackup" > /etc/urbackup/backupfolder
It's possible to create this file once the container is running and it will persist through restarts, until a new container image is pulled at which point urbackup becomes unable to use btrfs snapshots and falls back on traditional backups until /etc/urbackup/backupfolder is restored.
Workaround
The directory and file can be created alongside the container by adding the following line to the post-args field in advanced settings of the docker container (note the leading semicolon); docker exec binhex-urbackup bash -c "mkdir -p /etc/urbackup; echo '/media' > /etc/urbackup/backupfolder"