Hi!
I’m trying to get the image backup to work on a Ubuntu 22.04.2 with kernel 5.19.0-46-generic having a btrfs root partition. The client version is 2.5.24, installed directly from the server. The file backup is already working. Also, on another system with lvm/ext4 and dattobd the image backup is working.
I installed dattobd as I did for another system and I think it is working (I see the datto-ctl device). I selected dattobd snapshot type when I installed the client, because if I select btrfs snapshot the server says that image backup is not supported.
I am trying to get the backup image for /dev/sda2
I added some debug infos in the image snapshot scripts (in italic below) and set log level debug for urbackupclient. I can see the following in /var/log/urbackupclient.log :
2023-07-18 13:22:41: Started connection to SERVICE_COMMANDS
2023-07-18 13:22:41: ClientService cmd: #Iw9FCjc75LiGXVRG7yRsa#MBR driveletter=_dev_sda2&disk_path=%2Fdev%2Fsda2&image_full=1&running_jobs=1&token=nN5s49CSjUrt9a9w8ukw
2023-07-18 13:22:41: dl_devnum=a2
2023-07-18 13:22:41: gpt_style=true
2023-07-18 13:22:41: GUID partition table found
2023-07-18 13:22:41: GUID partition table size is 16 KB
2023-07-18 13:22:41: rc=0 hasError=true state=0
2023-07-18 13:22:41: SERVICE_COMMANDS finished
2023-07-18 13:22:41: Started connection to SERVICE_COMMANDS
2023-07-18 13:22:41: ClientService cmd: #Iw9FCjc75LiGXVRG7yRsa#FULL IMAGE letter=/dev/sda2&token=nN5s49CSjUrt9a9w8ukw&bitmap=1&status_id=37&running_jobs=1&zero_skipped=1
2023-07-18 13:22:41: Script “/usr/local/etc/urbackup/preimagebackup” does not exist
2023-07-18 13:22:41: WARNING: Could not open snapshot at “//.urbackup_snaps/2edf609a55276425138c39286e4531cf2f47bac8cf4a6826”
2023-07-18 13:22:41: WARNING: Removing reference because shadowcopy could not be openend
2023-07-18 13:22:41: WARNING: Restarting shadow copy of / because it was started by this server
2023-07-18 13:22:41: Releasing /dev/sda2 orig_target=/dev/sda2 target=//.urbackup_snaps/2edf609a55276425138c39286e4531cf2f47bac8cf4a6826
2023-07-18 13:22:41: Deleting shadowcopy for path “//.urbackup_snaps/2edf609a55276425138c39286e4531cf2f47bac8cf4a6826” -2
2023-07-18 13:22:41: Snapshot at //.urbackup_snaps/2edf609a55276425138c39286e4531cf2f47bac8cf4a6826 was already removed
2023-07-18 13:22:41: Started connection to SERVICE_COMMANDS
2023-07-18 13:22:41: ClientService cmd: #Iw9FCjc75LiGXVRG7yRsa#2PING RUNNING pc_done=0&status_id=37&speed_bpms=0&total_bytes=-1&done_bytes=0&paused_fb=1#token=nN5s49CSjUrt9a9w8ukw
2023-07-18 13:22:41: Deleting Shadowcopy for dir “/”
2023-07-18 13:22:41: dattobd_create_snapshot called as sh -c /usr/local/share/urbackup/dattobd_create_snapshot 8af5185e6c1657fc8408d5d459f0bad58d64efc37530330f “/” “/dev/sda2” “/dev/sda2” 2>&1 from
2023-07-18 13:22:41: SNAP_ID=8af5185e6c1657fc8408d5d459f0bad58d64efc37530330f
2023-07-18 13:22:41: SNAP_MOUNTPOINT=/
2023-07-18 13:22:41: SNAP_DEST=/mnt/urbackup_snaps/8af5185e6c1657fc8408d5d459f0bad58d64efc37530330f
2023-07-18 13:22:41: SNAP_MOUNTPOINT_SAN=_
2023-07-18 13:22:41: SNAP_NUM_PATH=/mnt/urbackup_snaps/cbt_info/_-snapdev
2023-07-18 13:22:41: SNAP_COWFILE_PATH=/mnt/urbackup_snaps/cbt_info/_-cowfile
2023-07-18 13:22:41: DEVICE=/dev/sda2
2023-07-18 13:22:41: TYPE=btrfs
2023-07-18 13:22:41: btrfs_create_filesystem_snapshot START
2023-07-18 13:22:41: SNAP_ID=8af5185e6c1657fc8408d5d459f0bad58d64efc37530330f
2023-07-18 13:22:41: SNAP_MOUNTPOINT=/
2023-07-18 13:22:41: SNAP_NAME=/dev/sda2
2023-07-18 13:22:41: SNAP_ORIG_PATH=/dev/sda2
2023-07-18 13:22:41: TYPE == btrfs
2023-07-18 13:22:41: btrfs snapshot command is: btrfs subvolume snapshot -r / //.urbackup_snaps/8af5185e6c1657fc8408d5d459f0bad58d64efc37530330f
2023-07-18 13:22:41: Create a readonly snapshot of ‘/’ in ‘//.urbackup_snaps/8af5185e6c1657fc8408d5d459f0bad58d64efc37530330f’
2023-07-18 13:22:41: btrfs_create_filesystem_snapshot FINISHED
2023-07-18 13:22:41: exiting with RESULT=0
2023-07-18 13:22:41: Shadowcopy path: //.urbackup_snaps/8af5185e6c1657fc8408d5d459f0bad58d64efc37530330f
2023-07-18 13:22:41: Disabling CBT on volume “/dev/sda2”
2023-07-18 13:22:41: ERROR: Error reading device file name from //.urbackup_snaps/8af5185e6c1657fc8408d5d459f0bad58d64efc37530330f-dev
2023-07-18 13:22:41: ERROR: Opening filesystem on device failed. Stopping.
2023-07-18 13:22:41: Device file: “//.urbackup_snaps/8af5185e6c1657fc8408d5d459f0bad58d64efc37530330f”
2023-07-18 13:22:41: Sending full image done
2023-07-18 13:22:41: Removing running process (1) id 6 server_id 37 token nN5s49CSjUrt9a9w8ukw action 3
2023-07-18 13:22:41: SERVICE_COMMANDS finished
2023-07-18 13:22:42: Started connection to SERVICE_COMMANDS
2023-07-18 13:22:42: ClientService cmd: #Iw9FCjc75LiGXVRG7yRsa#2LOGDATA 1689675761 0-1689675761-Starting unscheduled full image backup of volume “/dev/sda2”…
2-1689675761-Request of image backup failed. Reason: Opening filesystem on device failed. Stopping.
0-1689675761-Transferred 750 bytes - Average speed: 35.496 KBit/s
0-1689675761-Time taken for backing up client bogdan-ubuntu: 193ms
2-1689675761-Backup failed
2023-07-18 13:22:42: rc=0 hasError=true state=0
2023-07-18 13:22:42: SERVICE_COMMANDS finished
The first error is “Error reading device file name from //.urbackup_snaps/8af5185e6c1657fc8408d5d459f0bad58d64efc37530330f-dev”. But nothing creates that file in the “dattobd_create_snapshot” script, because the script ends after creating the snapshot: $CDIR/btrfs_create_filesystem_snapshot “$@”
The part where that file is created is at the end of the dattobd_create_snapshot script ( echo “/dev/datto$NUM” > ${SNAP_DEST}-dev ), but it never gets called because the script exits as shown above.
Can you please help me get this thing working?
Thank you,
Bogdan