Server 2.5.1 WIP/Client 2.5.1 WIP

New settings handling

The major change with server 2.5.x and client 2.5.x is a complete redesign how settings are handled. The goal is to make it more explicit and consistent.

  • Each setting has a button next to it which switches between inheriting the setting from the group, using the configuration value on the configuration page and using the value from the client, and for some setting merging client and server settings together
  • File backup paths are now a normal setting just like any other. No more separation between paths to backup configured on the client and default directories to backup

This is a critical area of UrBackup and as such needs a lot of testing. Focus should be on if the 2.4.x client still more or less works with the 2.5.x server (and especially doesn’t loose its connection settings for Internet servers).

Linux image backups

2.5.x can backup Linux clients (via dattobd only). The use case is e.g. backing up a DigitalOcean instance. It is explicitly not to create image backups of all possible configurations e.g. LVM, mdraid, btrfs, …
It can “live restore” a root volume, i.e., overwrite the root volume of a currently running machine. So one can image backup e.g. a DigitalOcean droplet. To restore create a new instance (tested with Debian 10/buster) then run the restore script which overwrites the current instance with the backed up instance using a trick to put the currently running system files into (compressed) memory.
Dattobd supports Changed Block Tracking (CBT), so image (and file) backups are done with CBT.

Linux image backup howto

Backup:

  • Install dattobd https://github.com/datto/dattobd/blob/master/INSTALL.md
  • To only backup used space install partclone (e.g. apt install partclone). This is currently supported for ext* and xfs. If partclone is not present it’ll backup unused space.
  • Install the (binary) client and select dattobd for snapshotting

Restore:

  • On the server browse to the image backup to restore
  • Click on “Restore Linux image”
  • Copy & paste the command into a new instance and follow the instructions (the command has a timeout (token), so after a while it should not work anymore)

Testing (image backup + file backup with CBT)

To test if CBT works correctly with file backups please enable Debugging: Verify file backups using client side hashes (for Internet clients with client-side hashing) or Debugging: End-to-end verification of all file backups in the advanced settings.

To test image backups enable md5sums creation on the client via touch /usr/local/var/create_md5sums_imagebackup. The client will then create a file (with date+time in the name) at /usr/local/var/md5sums-* for each image backup listing all files in the image plus their md5sum. Copy that file to server, mount the image backup then verify the md5sums with cd /backup/client/image_mnt; md5sums --quiet -c /path/to/md5sums-file.txt. The only files with checksum errors should be the .datto-*/.overlay-* files in the root directory and swap files (those get automatically excluded from backup).


Thanks for any help with testing and feedback!

Upgrade process

As always: Replace the executables (via the installers) and the database of the server/client will be updated on first running it.

Place the files from the update directory into C:\Program Files\UrBackupServer\urbackup or /var/urbackup to auto-update clients. Disable Download client from update server in the server settings to prevent the server from downloading the current version.

On Linux e.g. with this update script: https://github.com/ptempier/get_urbackupclient/blob/master/updateclient.sh

Downgrade process (server)

Stop the UrBackup server, restore C:\Program Files\UrBackupServer\urbackup or /var/urbackup from a backup before upgrade and then install the previous version over the beta release.

Changes with server 2.5.1 beta

  • Changes to support (limited) Linux image backups
  • Fixes to new settings handling
  • Upgrade to Visual Studio 2019
  • Use getrandom instead of reading from /dev/urandom if possible
  • Return error message if authentication key is empty
  • Fix check if image backup is already queued
  • Handle “all_nonusb” setting in image snapshot group
  • Fix storing alert state when serialization has null bytes
  • Fix backup_dirs_optional display + saving
  • Substract sparse extents before checking if file fits on storage
  • Upgrade miniz
  • Fix polish language name
  • Setting to only allow access to settings after the user enters a text
  • Add option to send mail SSL encrypted (without STARTTLS)

Changes with client 2.5.1 beta

  • Changes to support (limited) Linux image backups
  • Upgrade to Visual Studio 2019
  • Use getrandom instead of reading from /dev/urandom if possible
  • Fix rare race condition that makes indexing hange after reconnect

Changes with server 2.5.0 beta

  • Rework settings handling

Changes with client 2.5.0 beta

  • Rework settings handling

Downloads

1 Like

Known issues with the image backup:

It doesn’t html decode the volume name correctly. E.g. /dev/vda1 as image to backup would be mangled to /dev/vda1. This is only a cosmetic issue unless the settings are saved again after setting /dev/vda1 as volume to backup for the first time.

Also using ALL/ALL_NONUSB doesn’t work (yet) as volumes to backup.

I get the following error in the log when upgrading, and an error on web interface as well:
WARNING: SQLite: no such column: value_client in “SELECT value, value_client, use FROM settings_db.settings WHERE clientid=? AND key=?” errorcode: 1

next line is
ERROR: Error preparing Query [SELECT value, value_client, use FROM settings_db.settings WHERE clientid=? AND key=?]: no such column: value_client

Then crash errors. Any suggestions?

Just tested 2.5.1 on a debian 11 “testing” system for the server (due to the libc6 requirements) and debian 10 for the client. I could take full file backups no problem. The image backups seemed to work as indicated by the log and the files it created, but the status doesn’t change. The status is still saying “No recent backup”.

If I go into the Backups menu and click on my client I can see my image backup in there.

**Id:** 4
**Backup time:** 02/21/20 09:54
**Incremental:** No
**Size:** 7.13 GB
**Volume:** C:
**Archived:** ☐
**Volume size:** 20 GB
**Partition style:** MBR
**Disk number:** 0
**Partition number:** 1
**File system type:** ext4
**Volume name:** LINUX:/dev/vda1
**Serial number:** b801480a-9ca8-4b1d-977e-2f7937bc0010

Just tried restoring a Debian 10 image from my UrBackup and it sort of worked. What didn’t work is Grub wasn’t restored and I had to do the following commands;

Boot system rescue cd
: mount /dev/sda1 /mnt
: mount -o bind /proc /mnt/proc
: mount -o bind /dev /mnt/dev
: mount -o bind /dev/pts /mnt/dev/pts
: mount -o bind /sys /mnt/sys
: chroot /mnt
: grub-install /dev/sda
: exit
: shutdown -h now

Removed the CDROM from the VM

Booted and it worked!

Thanks, need to fix the hard coded if os==“windows” then update image backup status end in alert.lua…

And backup grub it seems. I have tested only overwriting existing systems, so it worked by chance… Did you restore to (current) root or to a different volume? Alternatively, it /boot a different volume? Because currently it does not automatically restore SYSVOL and perhaps automatic backup doesn’t work as well…

In regards to my grub tests I was restoring my Debian 10 image into a brand new VM with the same size as the original. The original Debian 10 system was all in one partition (ie: no separate /boot partition).

I’m also getting the message “Completed with issues” when doing a File backup (full or incremental doesn’t matter).

Here is what I’m getting;

02/24/20 11:02 INFO Referencing snapshot on “airiam” for path “.symlink_c99-gcc” failed: FAILED
02/24/20 11:02 DEBUG Loading file “.symlink_c99-gcc”
02/24/20 11:02 DEBUG GT: Loaded file “.symlink_c99-gcc”
02/24/20 11:02 DEBUG PT: Hashing file “.symlink_c99-gcc”
02/24/20 11:02 DEBUG HT: Copying file: “/media/BACKUP/urbackup/airiam/200224-1058/.symlink_c99-gcc” (id=4992)
02/24/20 11:02 DEBUG HT: Renaming file to “/media/BACKUP/urbackup/airiam/200224-1058/.symlink_c99-gcc” with hash output

This system I configured as LVM snapshots but later I’ve realised that we don’t have enough room to create a snapshot in my LVM. The other system named “logicalDOC” I get the same errors and it’s a Debian 10 machine with dattobd installed. The logicalDOC machine is the same machine which I successfully recovered the image from.

Update: I just found out that my dattodb wasn’t working correctly and I had multiple snapshots going on, maybe from failed backups. I cleaned them all up, tested dattobd on the command line and now the backups work fine on that machine.

Do you want me to put these issues in the issue tracker instead of here?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.