- Raspberry Pi 4 B with Pi OS Lite 64bit Debian Bookworm (12) and all updates
- UrBackup Server for Raspian 12 v2.5.33 installed via apt
- UrBackup Client for Windows v2.5.25
- Windows 10 Home 22H2
So… I’m retiring my 8-year-old raspi cloud file-backups server and building a new one… with UrBackup this time instead of Syncthing… but…
No matter what I try, urbackupsrv will not stay running on my new Raspberry Pi 4 once I installed the first test client on a Windows 10 laptop. With the client alive, every time I restart ubackupsrv, it exits 30-40 seconds later. If I stop the client (remove/whatever) urbackupsrv will stay up indefinitely. (By “exit” I mean the server status changes from “active (running)” to “active (exited)”.)
I’ve spent two nights trying everything I can think of to keep the server running. There’s not much guidance I could find on Linux privs for UrBackup but I think I’ve tried every combination of root and urbackup privs on the backup, tmp, and db folders, including various locations and drives and drive mounts. But… I don’t claim much expertise here either… so who knows what I might have missed. I tried to start simple(ish) with a plan to expand it later. I started with a USB3 HD (not SSD) for the backup drive, ext4 (hope to change to btrfs after testing); and a USB3 flash drive for the backup db (and tmp maybe) also ext4. But, no matter where I put tmp and whatever, nothing changes (very confusing, btw, keeping separate-but-needed settings for tmp and/or db drive changes in two separate places: the UI Advanced tab and /etc/default/urbackupsrv – it took many hours of reading conflicting/outdated info to figure those nuances out).
In general, nothing appears in /var/log/urbackup.log or the client logs–and nothing at all in the logs regarding the server exit. That is to say, okay, if I break other things on purpose, I’ll see some log lines about it. But, otherwise, leave the server running normally, connect the client, and no log lines generated by the exit event. The one thing that does happen, however, is that if I chmod all relevant folders to 777 and restart the server, it will change urbackup_tmp_files
back to urbackup:urbackup 750 before it exits (regardless of what I chown it to as well). Well, side note, it will also write the clients
folder and the ClientName
folder as well if not present, but not mod their privs or anything if present. All folders always remain empty. I tested touching files into those folders an it works fine. [Exactly like what is described here, but no libcrypto issues here like it was there, as far as I can tell (and if iowait is a thing, then no Pi would ever work): ERROR: No permission to access "/mypath/urbackup_tmp_files" ]
The log does like to throw this if I delete the folders… but then it creates it anyway and moves on:
2025-02-10 01:24:40: ERROR: No permission to access "/mnt/SkyPi/urbackup_tmp_files"
I’ve tried uninstalling and reinstalling everything on both the server and the client. There were some curious minor differences between the msi and exe Windows installers (both with tray icon)… but nothing that appeared to be significant to this. For example, the exe autofilled the Exclude pattern when the msi had not (even though I selected manual setups with each). After the exe install, the app didn’t popup the UAC windows like the msi install did… until after reboot. Weird, but whatever. They work the same in the end. (exe called itself UrBackup, msi called itself UrBackup Client, exe added itself to the Windows menu, msi did not.)
Like this post suggests in the end, urBackup server hang on file backup (Flushing file client) - #3 by ouille, I considered compiling on the Pi (and even pulled the source and started to)… but this is the Lite version of the OS and I didn’t care to try to turn it into a dev install.
So, now, debug logs. I’ll start with the client because its debug.log contains nothing near these server exit events. It instead has a ton of lines like these during OS start/wake events:
2025-02-09 16:02:07: WARNING: Parent of directory with FRN 227431781182230598 (Name "032800000000504615033EEE") with FRN 281474976710685 not found. Searching via MFT as fallback.
2025-02-09 16:02:07: WARNING: Parent not found. Was probably deleted.
2025-02-09 16:02:07: WARNING: SQLite: Safety level may not be changed inside a transaction in "PRAGMA synchronous=FULL" errorcode: 1
2025-02-09 16:02:07: ERROR: Error preparing Query [PRAGMA synchronous=FULL]: Safety level may not be changed inside a transaction
2025-02-09 16:02:07: WARNING: SQLite: Safety level may not be changed inside a transaction in "PRAGMA synchronous = 1" errorcode: 1
2025-02-09 16:02:07: ERROR: Error preparing Query [PRAGMA synchronous = 1]: Safety level may not be changed inside a transaction
2025-02-09 16:03:11: WARNING: Parent of file with FRN 242349954947947349 (Name "035D000000011B5543CE08E5") with FRN 281474976710685 not found. Searching via MFT as fallback.
2025-02-09 16:03:11: WARNING: Parent directory not found in MFT. Was probably deleted.
2025-02-09 16:03:11: WARNING: Parent of file with FRN 242349954947947349 (Name "035D000000011B5543CE08E5") with FRN 281474976710685 not found. Searching via MFT as fallback.
2025-02-09 16:03:11: WARNING: Parent directory not found in MFT. Was probably deleted.
The server’s /var/log/urbackup.log in debug mode, however, produces this from a single restart and exit 30-ish seconds later, and always the same:
2025-02-09 16:40:16: Starting HTTP-Server on port 55414
2025-02-09 16:40:16: HTTP: Server started up successfully!
2025-02-09 16:40:16: SQLite: recovered 30 frames from WAL file /var/urbackup/backup_server.db-wal code: 283
2025-02-09 16:40:16: SQLite: recovered 21 frames from WAL file /var/urbackup/backup_server_link_journal.db-wal code: 283
2025-02-09 16:40:16: SQLite: recovered 103 frames from WAL file /var/urbackup/backup_server_settings.db-wal code: 283
2025-02-09 16:40:16: SQLite: recovered 30 frames from WAL file /var/urbackup/backup_server.db-wal code: 283
2025-02-09 16:40:16: SQLite: recovered 103 frames from WAL file /var/urbackup/backup_server_settings.db-wal code: 283
2025-02-09 16:40:16: SQLite: recovered 21 frames from WAL file /var/urbackup/backup_server_link_journal.db-wal code: 283
2025-02-09 16:40:16: Started UrBackup...
2025-02-09 16:40:16: Removing temporary files...
2025-02-09 16:40:16: Recreating temporary folder...
2025-02-09 16:40:16: Image mounting disabled: TEST FAILED: guestmount is missing (libguestfs-tools)
2025-02-09 16:40:16: Testing if backup destination can handle subvolumes and snapshots...
2025-02-09 16:40:16: Backup destination cannot handle subvolumes and snapshots. Snapshots disabled.
2025-02-09 16:40:16: Testing if backup destination can handle filesystem transactions...
2025-02-09 16:40:16: Testing for hardlinks in backup destination...
2025-02-09 16:40:16: Could create hardlink at backup destination. Hardlinks enabled.
2025-02-09 16:40:16: Testing for reflinks in backup destination...
2025-02-09 16:40:16: Reflink ioctl failed. errno=95
2025-02-09 16:40:16: Could not create reflink at backup destination. Reflinks disabled. Operation not supported (code: 95)
2025-02-09 16:40:17: InternetService: Server started up successfully!
2025-02-09 16:40:17: UrBackup Server start up complete.
2025-02-09 16:40:17: Server started up successfully!
2025-02-09 16:40:17: Looking for old Sessions... 0 sessions
2025-02-09 16:40:17: Binding to interface eth0 (ipv4) for broadcasting...
2025-02-09 16:40:17: Broadcasting on ipv4 interface eth0 addr <redacted>
2025-02-09 16:40:17: Binding to interface wlan0 (ipv4) for broadcasting...
2025-02-09 16:40:17: Broadcasting on ipv4 interface wlan0 addr <redacted>
2025-02-09 16:40:17: Binding to interface eth0 (ipv6) for broadcasting...
2025-02-09 16:40:17: Broadcasting on ipv6 interface eth0 addr <redacted>
2025-02-09 16:40:17: Binding to interface wlan0 (ipv6) for broadcasting...
2025-02-09 16:40:17: Broadcasting on ipv6 interface wlan0 addr <redacted>
2025-02-09 16:40:18: Downloading version file...
2025-02-09 16:40:18: Downloading version file...
2025-02-09 16:40:18: Downloading server version info...
2025-02-09 16:40:19: Downloading dataplan database...
2025-02-09 16:40:48: New Backupclient: <redacted>
2025-02-09 16:40:49: Sending Identity to client "<redacted>" failed. Retrying soon...
2025-02-09 16:40:49: Encrypting with key f<redacted>U (server)
2025-02-09 16:40:49: Getting client settings...
2025-02-09 16:40:49: Encrypting with key f<redacted>e (server)
2025-02-09 16:40:49: Encrypting with key f<redacted>V (server)
2025-02-09 16:40:49: Flushing FileClient...
2025-02-09 16:40:49: Channel message: UPDATE ACCESS KEY
2025-02-09 16:40:49: Encrypting with key f<redacted>5 (server)
I can’t say I know, but the weird thing to me there is it is always trying to encrypt… and, yet, I thought I read encryption would only be an option for internet and not local… and, yet, I see encryption and compression as an option for local now in the server’s client settings… but not the client’s client settings. Again, very confusing. Or, is this just trying to encrypt the initial handshake? Regardless, no matter what I set all these various encryption and compression settings to (local and non)… no change in server auto-exit behavior.
One other thing all my digging revealed. When I uninstalled and reinstalled the client, the server stayed up for a while… until I told it, yes, I had switched the client… then it exited as usual. That event did, however, spit out this interesting extra tidbit in the server log:
2025-02-09 15:34:51: WARNING: Client UID changed from "sehlq4PawHnLitjO" to "NI6Eu574cG1csQsH". Disallowing client because connection to local/passive client is encrypted.
2025-02-09 15:34:51: ERROR: Could not get client capabilities
Then it was back to the other junk as usual.
So, yeah, wait, what? Is all this because I have Device Encryption turned on in Windows 10??? No, that last message said the “connection” was encrypted, not the device. Testing the theory anyway. Pulling out another laptop that’s old and not encrypted. Purging the Pi install… and, no go, same story with the client instead on an old Win10 with no encryption. Interesting, though, that I don’t get pestered with UAC popups on this old laptop, and the UrBackup folder files aren’t locked to the Admin, and that the debug.log doesn’t get filled with all that stuff mentioned earlier. This old one is my new test laptop for this.
So… alas… what am I missing?