UrBackup in OpenWrt

Hi all,

anybody tried/succeeded in installing UrBackup client in OpenWRT? I have a x64 router running, what is the best way to achieve that?

Thanks!

Bye

If it's x86, have you tried the precompiled binaries ?

https://www.urbackup.org/download.html#server_source

thanks for your quick reply!

The binaries you posted are for the server, I'd like to install the client. I have not tested the recommended way til now as I am afraid that it could cause some trouble as OpenWRT is not a full fledged Linux system. That is also why I was asking for some experience in the community. Also I am not sure if the way UrBackup is reading the file system for backups is compatible with OpenWRT... I'd like to avoid crashing my router :slight_smile:

Scroll up, the client part is posted above.

It depends on if the binaries are compiled static or dynamic.

I doubt UrBackup does weird stuff on the OS level, so unless you fill your disk space,
you're should pretty safe.

So you are saying that it should be pretty safe to install the linux client in the standard way? I have done this on several Debian machines (Raspberries) already so I am familar with that. Ok, I will give it a try later today, hopefully it will not destroy the router :slight_smile:

Thanks!

I'd probably not "install it", if there's an installation script included, without actually reading what it does.

If possible, just unpack it, and try to run it as it is,

Ok, I have set up a docker environment to test the installation with the following result:

/ # ./urbackup_client_install.sh                                                                                 
./urbackup_client_install.sh: line 387: tty: not found                                                           
Verifying archive integrity... All good.                                                                         
Uncompressing UrBackup Client Installer for Linux  100%                                                          
Installation of UrBackup Client 2.4.11 to /usr/local ... Proceed ? [Y/n]                                         
Y                                                                                                                
Uncompressing install data...                                                                                    
Assuming RedHat (derivative) system                                                                              
/etc/sysconfig does not exist. Putting daemon configuration into /etc/default                                    
Detected architecture x86_64-linux-glibc                                                                         
./install_client_linux.sh: line 111: install: not found

The issue here is that the "install" binary is not available. Is there a way to get this binary on OpenWRT?

Thanks!

After modifying the install script to copy the binaries directly via cp I get the following result:

 # ./urbackup_client_install.sh                                                                                 
./urbackup_client_install.sh: line 387: tty: not found                                                           
Verifying archive integrity... All good.                                                                         
Uncompressing UrBackup Client Installer for Linux  100%                                                          
Installation of UrBackup Client 2.4.11 to /usr/local ... Proceed ? [Y/n]                                         
Y                                                                                                                
Uncompressing install data...                                                                                    
Assuming RedHat (derivative) system                                                                              
/etc/sysconfig does not exist. Putting daemon configuration into /etc/default                                    
Detected architecture x86_64-linux-glibc                                                                         
/ # chmod +x /tmp/urbackupclient*                                                                                
/ # /tmp/urbackupclient                                                                                          
urbackupclientbackend  urbackupclientctl                                                                         
/ # /tmp/urbackupclient                                                                                          
urbackupclientbackend  urbackupclientctl                                                                         
/ # /tmp/urbackupclientctl                                                                                       
/bin/sh: /tmp/urbackupclientctl: not found                                                                       
/ # ls -la /tmp/urbackupclient*                                                                                  
-rwx--x--x    1 root     root       3122872 Feb  1 13:08 /tmp/urbackupclientbackend                              
-rwx--x--x    1 root     root        466520 Feb  1 13:08 /tmp/urbackupclientctl                                  
/ # /tmp/urbackupclientctl                                                                                       
/bin/sh: /tmp/urbackupclientctl: not found

So it seems the binaries are not compatible or I have done something wrong...

OK,

so it was a binary embedded into the shell script.

If you cut out all the text/commands until the binary information starts, you can
manually extract the .tar.

[root@atlantis ~]# head -n 502 UrBackup\ Client\ Linux\ 2.4.11.sh | wc -c
12001
[root@atlantis ~]# dd bs=12001 skip=1 if=UrBackup\ Client\ Linux\ 2.4.11.sh of=out.tar
1892+1 records in
1892+1 records out
22712320 bytes (23 MB, 22 MiB) copied, 0.0133722 s, 1.7 GB/s
[root@atlantis ~]# tar -xvf out.tar
./
./install-data.tar.gz
./install_client_linux.sh
[root@atlantis ~]#

Then manually tar gunzip the install-data.tar.gz
etc ....

Thank you very much for digging deeper into this!

The glibc version is not working but the android version is after a few manual steps (creating folders):

/ # ./x86_64-linux-android/urbackupclientbackend                                                                 
2021-02-01 13:59:14: SQLite: recovered 24 frames from WAL file /usr/local/var/urbackup/backup_client.db-wal code:
 283                                                                                                             
2021-02-01 13:59:14: urbackupserver: Server started up successfully!                                             
2021-02-01 13:59:14: ERROR: Error joining ipv6 multicast group ff12::f894:d:dd00:ef91                            
2021-02-01 13:59:14: Started UrBackupClient Backend...                                                           
2021-02-01 13:59:14: FileSrv: Servername: -daxiong828-openwrt-19.07.41-                                          
2021-02-01 13:59:15: Looking for old Sessions... 0 sessions

This looks promising! I am still not sure if other installation steps have been missed here but I have a good starting point.

Thanks again!

Why are you installing a backup client in OpenWrt? You can backup and restore the configuration already and a router's filesystem isn't changing all that often. Maybe there are other ways to do what you want to do, that don't involve trying to install UrBackup in OpenWrt.

I am basically trying to streamline all my systems through one backup server. You are right in the point that a router file system does not really change that often, but I want to also have a fast recovery which does not require me to install packages manually. So having a disc image seems the easiest way for me, which UrBackup is covering.

Hi @Talkabout ,
What about the second part of an image backup? The ability to restore.
You may have already addressed this IRL, but have not seen it discussed here.
Are you able to boot your device to the restore iso for urbackup?
And if so, does it have the drivers to use network and storage?
My point here is that an image backup is useless if you cannot restore it.
I use urbackup, and love it, and I have run into that very issue where the restore iso did not have the oddball network drivers for the device I was trying to restore. I like the idea of what you are trying to accomplish, just want to make sure it will work when you need it to.
-jk3wl

Hi @jk3wl ,
you are right, restore is part of backup. In my case my OpenWRT router is a x86 mini pc with an m2 ssd card attached to it. I have a second one lying around that I will use to restore the image backup on (can be done via USB case on any client machine) and simply exchange it in the router. So for me there is no reason to rely on the restore iso.

Excellent, you already have that figured out, and it sounds like you have more than one option for the restore, that is never a bad thing. :+1: :sunglasses:

Fair, the way I've been using so far is just to build an image with all packages I need with the ImageBuilder https://openwrt.org/docs/guide-user/additional-software/imagebuilder and backup the configuration.

If I need to restore I can just reflash the USB drive with that, and then restore the saved config.

It's also convenient for updates as well, as I don't need to re-download packages every time I upgrade my system.

2 Likes