Closed gwstorm closed 1 month ago
Thanks for reporting. Not sure what is going on. But your output indicates that BIT can not find a config.
ERROR: [common/backintime.py:705 getConfig] Back In Time is not configured!
It appears there's a disconnect between the UI and the config files. Running as root requires a config file in /root/.config/backintime
, which wasn't created when I restored the config from the backup drive. The directories at /root/.config/backintime
and /root/.local/share/backintime
were created though. I copied the config from $HOME/.config/backintime/
to the root path and the backup ran. However, all changes made to the config from the UI are reflected in the $HOME/.config/backintime
and not the root path, so any changes made don't get picked up for backups.
I still try to understand the problem and what you have done.
However, all changes made to the config from the UI are reflected in the
$HOME/.config/backintime
and not the root path, so any changes made don't get picked up for backups.
Do you mean that you start the BIT GUI as root but the configuration is stored in $HOME/.config/backintime
? What is $HOME
in that case? Isn't it /root
? Isn't it what is expected? How do you start the BIT GUI as root?
As of late April, I had to switch to a different backup solution. But ultimately I had used BiT for probably close to a decade with largely the same setup and configuration until it just stopped working. Because of this, my memory is a little fuzzy, but I have kept the package up to date. I believe what was happening is that any changes I made via the graphical interface when running via sudo -E backintime-qt
weren't being reflected in the /root path configs, but that is where running backups were getting their configuration from. I can still run a backup manually, but any scheduled backups still fail, so I suppose it's a two-part issue, the latter of which is probably the most critical since it impairs the functionality of the scheduled backups. The importing of the backup config is certainly not ideal, but it can at least be fixed manually.
I did just try to run a scheduled backup and it failed still. The output of that event is below.
Aug 08 08:39:12 europa crontab[54820]: (root) REPLACE (root)
Aug 08 08:39:12 europa crontab[54819]: (root) LIST (root)
Aug 08 08:38:04 europa systemd[1]: Unmounted EFI System Partition Automount.
Aug 08 08:38:04 europa systemd[1]: boot.mount: Deactivated successfully.
Aug 08 08:38:04 europa systemd[1]: Unmounting EFI System Partition Automount...
Aug 08 08:35:24 europa systemd[1]: Mounted EFI System Partition Automount.
Aug 08 08:35:24 europa systemd[1]: Mounting EFI System Partition Automount...
Aug 08 08:35:24 europa systemd[1]: boot.automount: Got automount request for /boot, triggered by 44507 (rsync)
Aug 08 08:35:00 europa backintime[44489]: Main profile(1) :: DEBUG: [common/tools.py:2618 run] Starting command 'rsync --recursiv...'
Aug 08 08:35:00 europa backintime[44489]: Main profile(1) :: DEBUG: [common/snapshots.py:888 Snapshots.backup] Call command "rsync --recursive --times --devices --specials --hard-links --human-readable -s --links --perms --executability --group --owner --info=progress2 --no-inc-recursive --delete --delete-excluded -v -i --out-format=BACKINTIME: %i %n%L --link-dest=../../20240801-091631-691/backup --chmod=Du+wx --exclude=***REDACTED*** / /mnt/backup/backintime/desktop/root/1/new_snapshot/backup"
Aug 08 08:35:00 europa backintime[44489]: Main profile(1) :: INFO: [common/snapshots.py:1356 Snapshots.takeSnapshot] Call rsync to take the snapshot
Aug 08 08:35:00 europa backintime[44489]: Main profile(1) :: INFO: [common/snapshots.py:825 Snapshots.backup] Take a new snapshot. Profile: 1 Main profile
Aug 08 08:35:00 europa backintime[44489]: Main profile(1) :: DEBUG: [common/mount.py:170 Mount.__init__] Call command: /usr/bin/backintime pw-cache start
Aug 08 08:35:00 europa backintime[44489]: Main profile(1) :: DEBUG: [common/mount.py:162 Mount.__init__] pw-cache is not running
Aug 08 08:35:00 europa backintime[44489]: Main profile(1) :: DEBUG: [common/tools.py:1263 keyringSupported] No keyring due to import error.
Aug 08 08:35:00 europa backintime[44489]: Main profile(1) :: DEBUG: [common/tools.py:1751 inhibitSuspend] Inhibit Suspend failed because BIT was started as root.
Aug 08 08:35:00 europa backintime[44489]: Main profile(1) :: INFO: [common/snapshots.py:786 Snapshots.backup] Lock
Aug 08 08:35:00 europa backintime[44489]: Main profile(1) :: DEBUG: [common/flock.py:67 GlobalFlock._log] Set flock /run/lock/backintime.lock by PID 44489
Aug 08 08:35:00 europa backintime[44489]: Main profile(1) :: DEBUG: [common/applicationinstance.py:209 flockUnlock] Trying to remove the advisory lock from the flock file /root/.local/share/backintime/worker.lock.flock
Aug 08 08:35:00 europa backintime[44489]: Main profile(1) :: DEBUG: [common/applicationinstance.py:177 flockExclusiv] Trying to put an advisory lock on the flock file /root/.local/share/backintime/worker.lock.flock
Aug 08 08:35:00 europa backintime[44489]: Main profile(1) :: DEBUG: [plugins/systrayiconplugin.py:80 init] No system tray available to show the BiT system tray icon
Aug 08 08:35:00 europa backintime[44489]: Main profile(1) :: DEBUG: [common/tools.py:861 is_Qt_working] Qt probing errout:
DEBUG: [common/qt_probing.py:89 <module>] /usr/share/backintime/common/qt_probing.py started... Call args: ['/usr/share/backintime/common/qt_probing.py', '--debug']
DEBUG: [common/qt_probing.py:90 <module>] Display system: ($XDG_SESSION_TYPE is not set)
DEBUG: [common/qt_probing.py:91 <module>] XDG_RUNTIME_DIR=($XDG_RUNTIME_DIR is not set)
DEBUG: [common/qt_probing.py:92 <module>] XAUTHORITY=($XAUTHORITY is not set)
DEBUG: [common/qt_probing.py:93 <module>] QT_QPA_PLATFORM=($QT_QPA_PLATFORM is not set)
DEBUG: [common/qt_probing.py:95 <module>] Current euid: 0
Authorization required, but no authorization protocol specified
Aug 08 08:35:00 europa backintime[44489]: Main profile(1) :: DEBUG: [common/tools.py:860 is_Qt_working] Qt probing stdout:
Aug 08 08:35:00 europa backintime[44489]: Main profile(1) :: DEBUG: [common/tools.py:857 is_Qt_working] Qt probing result: exit code -6
Aug 08 08:35:00 europa systemd[1]: systemd-coredump@0-44492-0.service: Deactivated successfully.
Aug 08 08:35:00 europa systemd-coredump[44494]: Process 44490 (python) of user 0 terminated abnormally without generating a coredump.
Aug 08 08:35:00 europa systemd-coredump[44494]: Resource limits disable core dumping for process 44490 (python).
Aug 08 08:35:00 europa systemd-coredump[44494]: Removed old coredump core.Discord.1000.6fd8ad479e574617aff3e4f2a0d9c5b6.2281.1722403705000000.zst.
Aug 08 08:35:00 europa systemd[1]: Started Process Core Dump (PID 44492/UID 0).
Aug 08 08:35:00 europa systemd[1]: Created slice Slice /system/systemd-coredump.
Aug 08 08:35:00 europa systemd-coredump[44492]: Process 44490 (python) of user 0 terminated abnormally with signal 6/ABRT, processing...
Aug 08 08:35:00 europa python[44490]: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vkkhrdisplay, vnc, xcb, wayland-egl, wayland.
Aug 08 08:35:00 europa python[44490]: qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
Aug 08 08:35:00 europa python[44490]: qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.
Aug 08 08:35:00 europa python[44490]: qt.qpa.xcb: could not connect to display :0.0
Aug 08 08:35:00 europa backintime[44490]: DEBUG: [common/qt_probing.py:95 <module>] Current euid: 0
Aug 08 08:35:00 europa backintime[44490]: DEBUG: [common/qt_probing.py:93 <module>] QT_QPA_PLATFORM=($QT_QPA_PLATFORM is not set)
Aug 08 08:35:00 europa backintime[44490]: DEBUG: [common/qt_probing.py:92 <module>] XAUTHORITY=($XAUTHORITY is not set)
Aug 08 08:35:00 europa backintime[44490]: DEBUG: [common/qt_probing.py:91 <module>] XDG_RUNTIME_DIR=($XDG_RUNTIME_DIR is not set)
Aug 08 08:35:00 europa backintime[44490]: DEBUG: [common/qt_probing.py:90 <module>] Display system: ($XDG_SESSION_TYPE is not set)
Aug 08 08:35:00 europa backintime[44490]: DEBUG: [common/qt_probing.py:89 <module>] /usr/share/backintime/common/qt_probing.py started... Call args: ['/usr/share/backintime/common/qt_probing.py', '--debug']
Aug 08 08:35:00 europa CROND[44480]: pam_unix(crond:session): session closed for user root
Aug 08 08:35:00 europa CROND[44480]: (root) CMDEND (/usr/bin/nice -n19 /usr/bin/ionice -c2 -n7 /usr/bin/backintime --debug backup-job >/dev/null)
Aug 08 08:35:00 europa backintime[44489]: Main profile(1) :: DEBUG: [common/pluginmanager.py:253 PluginManager.load] Probing plugin systrayiconplugin.py
Aug 08 08:35:00 europa backintime[44489]: Main profile(1) :: DEBUG: [common/pluginmanager.py:268 PluginManager.load] Add plugin notifyplugin.py
Aug 08 08:35:00 europa backintime[44489]: Main profile(1) :: DEBUG: [common/pluginmanager.py:253 PluginManager.load] Probing plugin notifyplugin.py
Aug 08 08:35:00 europa backintime[44489]: Main profile(1) :: DEBUG: [common/pluginmanager.py:253 PluginManager.load] Probing plugin usercallbackplugin.py
Aug 08 08:35:00 europa backintime[44489]: Main profile(1) :: DEBUG: [common/pluginmanager.py:247 PluginManager.load] Register plugin path /usr/share/backintime/plugins
Aug 08 08:35:00 europa backintime[44489]: Main profile(1) :: DEBUG: [common/backintime.py:698 getConfig] profiles: 1=Main profile
Aug 08 08:35:00 europa backintime[44489]: Main profile(1) :: DEBUG: [common/backintime.py:697 getConfig] share path: /root/.local/share/backintime
Aug 08 08:35:00 europa backintime[44489]: Main profile(1) :: DEBUG: [common/backintime.py:696 getConfig] config file: /root/.config/backintime/config
Aug 08 08:35:00 europa backintime[44489]: Main profile(1) :: DEBUG: [common/tools.py:278 set_lc_time_by_language_code] Try to set locale.LC_TIME to "en_US.UTF-8" based on language code "en".
Aug 08 08:35:00 europa backintime[44489]: Main profile(1) :: DEBUG: [common/tools.py:229 initiate_translation] No language code. Use systems current locale.
Aug 08 08:35:00 europa backintime[44489]: Main profile(1) :: DEBUG: [common/configfile.py:591 Config.setCurrentProfile] Change current profile: 1=Main profile
Aug 08 08:35:00 europa CROND[44480]: (root) CMDOUT (DEBUG: [common/tools.py:2762 BackupJobDaemon.daemonize] redirect standard file descriptors)
Aug 08 08:35:00 europa backintime[44489]: DEBUG: [common/tools.py:2762 BackupJobDaemon.daemonize] redirect standard file descriptors
Aug 08 08:35:00 europa backintime[44489]: DEBUG: [common/tools.py:2753 BackupJobDaemon.daemonize] second fork pid: 0
Aug 08 08:35:00 europa CROND[44480]: (root) CMDOUT (DEBUG: [common/tools.py:2753 BackupJobDaemon.daemonize] second fork pid: 0)
Aug 08 08:35:00 europa backintime[44488]: DEBUG: [common/tools.py:2753 BackupJobDaemon.daemonize] second fork pid: 44489
Aug 08 08:35:00 europa CROND[44480]: (root) CMDOUT (DEBUG: [common/tools.py:2753 BackupJobDaemon.daemonize] second fork pid: 44489)
Aug 08 08:35:00 europa CROND[44480]: (root) CMDOUT (DEBUG: [common/tools.py:2745 BackupJobDaemon.daemonize] decouple from parent environment)
Aug 08 08:35:00 europa backintime[44488]: DEBUG: [common/tools.py:2745 BackupJobDaemon.daemonize] decouple from parent environment
Aug 08 08:35:00 europa backintime[44488]: DEBUG: [common/tools.py:2736 BackupJobDaemon.daemonize] first fork pid: 0
Aug 08 08:35:00 europa CROND[44480]: (root) CMDOUT (DEBUG: [common/tools.py:2736 BackupJobDaemon.daemonize] first fork pid: 0)
Aug 08 08:35:00 europa CROND[44480]: (root) CMDOUT (DEBUG: [common/tools.py:2736 BackupJobDaemon.daemonize] first fork pid: 44488)
Aug 08 08:35:00 europa backintime[44487]: DEBUG: [common/tools.py:2736 BackupJobDaemon.daemonize] first fork pid: 44488
Aug 08 08:35:00 europa CROND[44480]: (root) CMDOUT (DEBUG: [common/backintime.py:513 startApp] host-setup: {'OS': {'/etc/os-release': 'Arch Linux', '/etc/arch-release': '\n', '/etc/lsb-release': 'DISTRIB_ID="Arch"\nDISTRIB_RELEASE="rolling"\nDISTRIB_DESCRIPTION="Arch Linux"\n'}})
Aug 08 08:35:00 europa CROND[44480]: (root) CMDOUT (DEBUG: [common/backintime.py:513 startApp] backintime: {'name': 'Back In Time', 'version': '1.4.4-dev.4d7e920a', 'running-as-root': False})
Aug 08 08:35:00 europa backintime[44487]: DEBUG: [common/backintime.py:513 startApp] host-setup: {'OS': {'/etc/os-release': 'Arch Linux', '/etc/arch-release': '\n', '/etc/lsb-release': 'DISTRIB_ID="Arch"\nDISTRIB_RELEASE="rolling"\nDISTRIB_DESCRIPTION="Arch Linux"\n'}}
Aug 08 08:35:00 europa backintime[44487]: DEBUG: [common/backintime.py:513 startApp] backintime: {'name': 'Back In Time', 'version': '1.4.4-dev.4d7e920a', 'running-as-root': False}
Aug 08 08:35:00 europa CROND[44480]: (root) CMDOUT (DEBUG: [common/backintime.py:614 argParse] Unknown argument(s): [])
Aug 08 08:35:00 europa CROND[44480]: (root) CMDOUT (DEBUG: [common/backintime.py:613 argParse] Used argument(s): {'debug': True, 'quiet': False, 'command': 'backup-job', 'checksum': False, 'func': <function backupJob at 0x765e3a63cb80>})
Aug 08 08:35:00 europa backintime[44487]: DEBUG: [common/backintime.py:614 argParse] Unknown argument(s): []
Aug 08 08:35:00 europa backintime[44487]: DEBUG: [common/backintime.py:613 argParse] Used argument(s): {'debug': True, 'quiet': False, 'command': 'backup-job', 'checksum': False, 'func': <function backupJob at 0x765e3a63cb80>}
Aug 08 08:35:00 europa CROND[44482]: (root) CMD (/usr/bin/nice -n19 /usr/bin/ionice -c2 -n7 /usr/bin/backintime --debug backup-job >/dev/null)
Aug 08 08:35:00 europa crond[44480]: pam_unix(crond:session): session opened for user root(uid=0) by root(uid=0)
I'm happy to take any instructions to see if it can be resolved, but I understand if it's maybe too specific to my setup to be worth the time.
Thank you very much for reporting back. This does help. I am assuming this is related to the way you start BIT. I will investigate this.
No worries. Just for what it's worth, and I think this is in another issue somewhere, if I try to start via the polkit launcher, I get this -
❯ backintime-qt_polkit
Back In Time
Version: 1.4.4-dev.4d7e920a
Back In Time comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; type `backintime --license' for details.
Authorization required, but no authorization protocol specified
qt.qpa.xcb: could not connect to display :0
qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vkkhrdisplay, vnc, xcb, wayland-egl, wayland.
/usr/bin/backintime-qt: line 31: 226693 Aborted (core dumped) /usr/bin/python -Es ${APP_PATH}/app.py "$@"
It does prompt for my password if I run it without sudo, but both will result in that output... Which is why I have to run with sudo -E backintime-qt
.
When I run bit via sudo:
$ sudo -E ./backintime-qt --debug
DEBUG: [common/backintime.py:616 argParse] Argument(s) used: {'debug': True, 'quiet': False}
DEBUG: [common/backintime.py:515 startApp] backintime: {'name': 'Back In Time', 'version': '1.5.3-dev.3e80feee', 'running-as-root': False}; host-setup: {'OS': {'/etc/os-release': 'Debian GNU/Linux 12 (bookworm)', '/etc/debian_version': '12.7\n'}}
WARNING: [common/backintime.py:526 startApp] It looks like you're using 'sudo' to start Back In Time. This will cause some trouble. Please use either 'sudo -i backintime-qt' or 'pkexec backintime-qt'.
...
DEBUG: [common/backintime.py:698 getConfig] config file: "/home/user/.config/backintime/config"; share path: "/home/user/.local/share/backintime"; profiles: "1=Main profile, 3=playwithme"
...
It is clear that that BIT running via sudo will give you a warning and will still use the users config file. That behavior is intended because sudo is not root but the current user with root permissions.
I see no bug. The only thing I see to change should be a more impressive warning/error message in the GUI about the situation.
Any other suggestions?
I guess with the elevated root permissions it used to work, but you're right in how it works now would be more correct. But in the end, the fact that backups fail to run, there's still an issue. It might be that I was going down the wrong path, but I still get errors when trying to let cron handle backups.
There's nothing special to it. I've even reset it and tried a clean configuration. But ultimately, when I switched to wayland, things started to fail.
I'll close this now as it must just be a very specific user case that causes this.
Actually, it is working now that I waited long enough. I just assumed it was still broken because the GUI doesn't show activity anymore. It used to show a preview of files being backed up in the bottom and since that isn't happening, I assumed it was erroring out.
output of the console command backintime --diagnostics
> { > "backintime": { > "name": "Back In Time", > "version": "1.4.4-dev.d33f35e1", > "running-as-root": false, > "latest-config-version": 6, > "local-config-file": "/root/.config/backintime/config", > "local-config-file-found": false, > "global-config-file": "/etc/backintime/config", > "global-config-file-found": false, > "started-from": "/usr/share/backintime/common", > "user-callback": "/root/.config/backintime/user-callback", > "keyring-supported": false > }, > "host-setup": { > "OS": { > "/etc/os-release": "Arch Linux", > "/etc/arch-release": "", > "/etc/lsb-release": "DISTRIB_ID=\"Arch\"\nDISTRIB_RELEASE=\"rolling\"\nDISTRIB_DESCRIPTION=\"Arch Linux\"\n" > }, > "platform": "Linux-6.8.4-zen1-1-zen-x86_64-with-glibc2.39", > "system": "Linux #1 ZEN SMP PREEMPT_DYNAMIC Fri, 05 Apr 2024 00:14:08 +0000", > "display-system": "($XDG_SESSION_TYPE not set)", > "locale": "en_US, UTF-8", > "PATH": "/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl", > "RSYNC_OLD_ARGS": "(not set)", > "RSYNC_PROTECT_ARGS": "(not set)" > }, > "python-setup": { > "python": "3.11.8 main Feb 12 2024 14:50:05 CPython GCC 13.2.1 20230801", > "python-executable": "/usr/bin/python3", > "python-executable-symlink": true, > "python-executable-resolved": "/usr/bin/python3.11", > "sys.path": [ > "/usr/share/backintime/qt/plugins", > "/usr/share/backintime/common/plugins", > "/usr/share/backintime/plugins", > "/usr/share/backintime/common", > "/usr/lib/python311.zip", > "/usr/lib/python3.11", > "/usr/lib/python3.11/lib-dynload", > "/usr/lib/python3.11/site-packages" > ], > "qt": { > "Version": "PyQt 6.6.1 / Qt 6.6.3" > } > }, > "external-programs": { > "rsync": { > "version": "3.2.7", > "protocol": "31.0", > "capabilities": { > "file_bits": 64, > "inum_bits": 64, > "timestamp_bits": 64, > "long_int_bits": 64, > "socketpairs": true, > "symlinks": true, > "symtimes": true, > "hardlinks": true, > "hardlink_specials": true, > "hardlink_symlinks": true, > "IPv6": true, > "atimes": true, > "batchfiles": true, > "inplace": true, > "append": true, > "ACLs": true, > "xattrs": true, > "secluded_args": "optional", > "iconv": true, > "prealloc": true, > "stop_at": true, > "crtimes": false > }, > "optimizations": { > "SIMD_roll": true, > "asm_roll": false, > "openssl_crypto": true, > "asm_MD5": false > }, > "checksum_list": [ > "xxh128", > "xxh3", > "xxh64", > "md5", > "md4", > "sha1", > "none" > ], > "compress_list": [ > "zstd", > "lz4", > "zlibx", > "zlib", > "none" > ], > "daemon_auth_list": [ > "sha512", > "sha256", > "sha1", > "md5", > "md4" > ] > }, > "ssh": "OpenSSH_9.7p1, OpenSSL 3.2.1 30 Jan 2024", > "sshfs": "(no sshfs)", > "encfs": "(no encfs)", > "shell": "/usr/bin/bash", > "shell-version": "GNU bash, version 5.2.26(1)-release (x86_64-pc-linux-gnu)" > } > }Version: backintime-git from the AUR built in clean chroot
Scheduled backups have stopped working when configuring BiT as root. I've read that it's not the recommended method, but the polkit option doesn't work with Wayland and there are some critical files that I like to back up from various directories like
/etc
and/var
that a regular user can't touch. I've tried the every 5 minutes, anacron and custom hours (the latter being what I've always used) and the result is always the same -journal output after scheduled backup attempt.
``` Apr 11 08:35:00 europa crond[55536]: pam_unix(crond:session): session opened for user root(uid=0) by root(uid=0) Apr 11 08:35:00 europa CROND[55539]: (root) CMD (/usr/bin/nice -n19 /usr/bin/ionice -c2 -n7 /usr/bin/backintime --debug backup-job) Apr 11 08:35:00 europa backintime[55543]: DEBUG: [common/backintime.py:608 argParse] Used argument(s): {'debug': True, 'quiet': False, 'command': 'backup-job', 'checksum': False, 'func':I have tried creating alternate profiles and verified that rsync itself initiated by cron does work as I have a single rsync command running daily for another backup.
Running BiT via
sudo -E backintime-qt
allows for manual snapshots under the same profile that failed when executed from the cronjob.Here's the cron as it is created by BiT -