UrBackup Server 2.1.6 beta

Same thing after rebooting the server, and there’s nothing special in /var/log/urbackup.log

Can you try running it as urbackup user, that is:

su urbackup -c “urbackup_mount_helper test”

Command gives no output :

root@urbackup-3:~# su urbackup -c "urbackup_mount_helper test"
root@urbackup-3:~#
root@urbackup-3:~# su -c "urbackup_mount_helper test" urbackup
root@urbackup-3:~#

Setting /bin/bash instead of /bin/false in /etc/passwd and :

root@urbackup-3:~# su urbackup
urbackup@urbackup-3:/root$ cd ~
urbackup@urbackup-3:~$ urbackup_mount_helper test
Cannot become root user
urbackup@urbackup-3:~$

Regards,

urbackup@urbackup-3:~$ ls -l /usr/bin/urbackup*
-rwxr-xr-x 1 root root  954552 déc.   8 21:02 /usr/bin/urbackup_mount_helper
-rwsr-sr-x 1 root root  958616 déc.   8 21:02 /usr/bin/urbackup_snapshot_helper
-rwxr-xr-x 1 root root 7206736 déc.   8 21:02 /usr/bin/urbackupsrv
urbackup@urbackup-3:~$
root@urbackup-3:~# chmod 6755 /usr/bin/urbackup_mount_helper
root@urbackup-3:~# su -c "urbackup_mount_helper test" urbackup
MOUNT TEST OK
root@urbackup-3:~#

Now i have the “Mount image” button appearing :

But file list is empty after click on “mount image” :

Try with /media/backup/urbackup/clientname/161104-2258_Image_C/Image_C_161104-2258.raw being an image path:

su urbackup -c “urbackup_mount_helper mount clientname 161104-2258_Image_C Image_C_161104-2258.raw”

root@urbackup-3:~# su urbackup -c "urbackup_mount_helper mount SVIMPORT /media/aaaf8b05-4c27-4948-802b-acce40b9a67e/backups/SVIMPORT/161209-1119_Image_C/Image_C_161209-1119.raw"
terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_M_construct null not valid
root@urbackup-3:~#

Can you do:

su urbackup -c “gdb --args urbackup_mount_helper mount clientname 161104-2258_Image_C Image_C_161104-2258.raw”
run
bt

root@urbackup-3:~# su urbackup -c "gdb --args urbackup_mount_helper mount SVIMPORT /media/aaaf8b05-4c27-4948-802b-acce40b9a67e/backups/SVIMPORT/161209-1119_Image_C/Image_C_161209-1119.raw"
GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from urbackup_mount_helper...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/urbackup_mount_helper mount SVIMPORT /media/aaaf8b05-4c27-4948-802b-acce40b9a67e/backups/SVIMPORT/161209-1119_Image_C/Image_C_161209-1119.raw
[tcsetpgrp failed in terminal_inferior: Ioctl() inapproprié pour un périphérique]
[tcsetpgrp failed in terminal_inferior: Ioctl() inapproprié pour un périphérique]
Error while mapping shared library sections:
linux-vdso.so.1: Permission non accordée.
[tcsetpgrp failed in terminal_inferior: Ioctl() inapproprié pour un périphérique]
[tcsetpgrp failed in terminal_inferior: Ioctl() inapproprié pour un périphérique]
Cannot become root user
[Inferior 1 (process 2186) exited with code 01]
(gdb) bt
No stack.
(gdb)

In english :

root@urbackup-3:~# su urbackup -c "export LANG=en_EN.UTF8 ; gdb --args urbackup_mount_helper mount SVIMPORT /media/aaaf8b05-4c27-4948-802b-acce40b9a67e/backups/SVIMPORT/161209-1119_Image_C/Image_C_161209-1119.raw"
GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from urbackup_mount_helper...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/urbackup_mount_helper mount SVIMPORT /media/aaaf8b05-4c27-4948-802b-acce40b9a67e/backups/SVIMPORT/161209-1119_Image_C/Image_C_161209-1119.raw
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
Error while mapping shared library sections:
linux-vdso.so.1: Permission denied.
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
Cannot become root user
[Inferior 1 (process 2224) exited with code 01]
(gdb) bt
No stack.
(gdb)

Now without the su please :wink:

Here you are :

root@urbackup-3:~# export LANG=en_EN.UTF8 ; gdb --args urbackup_mount_helper mount SVIMPORT /media/aaaf8b05-4c27-4948-802b-acce40b9a67e/backups/SVIMPORT/161209-1119_Image_C/Image_C_161209-1119.raw
GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from urbackup_mount_helper...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/urbackup_mount_helper mount SVIMPORT /media/aaaf8b05-4c27-4948-802b-acce40b9a67e/backups/SVIMPORT/161209-1119_Image_C/Image_C_161209-1119.raw
terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_M_construct null not valid

Program received signal SIGABRT, Aborted.
0x00007f51b9648067 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0  0x00007f51b9648067 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f51b9649448 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x0000000000492b8d in ?? ()
#3  0x0000000000411506 in ?? ()
#4  0x0000000000411551 in ?? ()
#5  0x0000000000411499 in ?? ()
#6  0x000000000048fcdf in ?? ()
#7  0x0000000000404024 in ?? ()
#8  0x00000000004030cc in ?? ()
#9  0x00007f51b9634b45 in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#10 0x0000000000403f19 in ?? ()
(gdb)

Sry, did not see how you called it. Please try

su urbackup -c “urbackup_mount_helper mount SVIMPORT 161209-1119_Image_C Image_C_161209-1119.raw”

instead of what you called.

No problem …

root@urbackup-3:~# su urbackup -c "urbackup_mount_helper mount SVIMPORT 161209-1119_Image_C Image_C_161209-1119.raw"
Guestmount...
libguestfs: error: qemu-img: /tmp/libguestfsAwqbrG/overlay1: qemu-img exited with error status 1.
To see full error messages you may need to enable debugging.
See http://libguestfs.org/guestfs-faq.1.html#debugging-libguestfs
root@urbackup-3:~#

I see, in the other thread that it has an Intel Atom D525 processor. That does not have the VT-x extension which libguestfs-tools needs, that is probably why it does not work.

Okay, i’m going to try on another test platform which have VT-x …

You’re right, need of VT-x !
And a “chmod 6755 /usr/bin/urbackup_mount_helper” :wink: :

1 Like

Also, you should add a depedency on libguestfs-tools package …

Thanks !

BTW, when will the image be unmounted ? is there an automatic “unmount” ?

root@urbackup-4:~# mount
[...]
/dev/sdb1 on /media/urbackup type btrfs (rw,relatime,compress-force=zlib,space_cache,enospc_debug,subvolid=5,subvol=/)
/dev/fuse on /media/urbackup/SV62/161111-2001_Image_C_mnt type fuse (rw,nosuid,nodev,relatime,user_id=108,group_id=113)
root@urbackup-4:~#

Thanks.

Regards,

Just updated it in place, the debian package sets the setuid bit correctly now and the package has a dependency to libguestfs-tools.

After 1h not being used.

1 Like