-
Notifications
You must be signed in to change notification settings - Fork 271
Description
Describe the problem, feature or ask a question:
When multiple users on the same box tick "Only one snapshot at a time" (or so, I use the German version) in the settings the first user creating the /tmp/backintime.lock file is the only one who can run backups. I attach the output of backintime backup --debug for another user being unable to run backups.
The python exception is somewhat misleading: the file has permissions:
-rw-rw-rw- 1 richard richard 0 Nov 27 15:11 backintime.lock
and should be writable by others (I can open the file in a text editor just fine with any user).
I tried lsof -a -p $$ on both users, there don't seem to be open file descriptors for that file (in case your code tries an exclusive write lock, I am not very knowledgable in python). If you know a better way to find open file descriptors, please let me know (I tried ls -l /proc/$$/fd as well).
As well, there is no indication whatsoever that something went wrong in the UI. It just says something along the lines "Ready, no snapshot necessary" in the status bar. Bringing up the last log shows only the log of the last successful backup. At first, this was puzzling for me as there where clearly files being newer than the last snapshot.
On a side note:
I am using anacron scheduling. If I understand anacron correctly it is backed by a cron job running every 15 min. If this is combined with running only one backup at a time for multiple users/profiles there is a risk of running never a snapshot for some of the users/profiles if the snapshot is not retried outside the anacron schedule. The following might happen each time (in that order, daily jobs):
- Anacron starts for user A (process A)
- Anacron starts for user B (process B); due to how anacron works, this will be the same time as the step before (give or take some ms)
- Process A checks global lock and locks backintime globally
- Process B checks global lock and gives up
- Process B exits. Anacron job for process B is done and anacron notes that the scheduled job for that day has been run
- Process A runs its backup and releases the global lock
- Process A exits. Anacron job for process A is done and anacron notes that the scheduled job for that day has been run
If this happens every day, snapshots for user B will never being run.
Diagnostics
{
"backintime": {
"name": "Back In Time",
"version": "1.4.3",
"latest-config-version": 6,
"local-config-file": "/home/UsernameReplaced/.config/backintime/config",
"local-config-file-found": true,
"global-config-file": "/etc/backintime/config",
"global-config-file-found": false,
"started-from": "/usr/share/backintime/common",
"running-as-root": false,
"user-callback": "/home/UsernameReplaced/.config/backintime/user-callback",
"keyring-supported": true
},
"host-setup": {
"platform": "Linux-6.14.0-36-generic-x86_64-with-glibc2.39",
"system": "Linux #36~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Oct 15 15:45:17 UTC 2",
"OS": {
"/etc/os-release": "Linux Mint 22.2",
"/etc/lsb-release": "DISTRIB_ID=LinuxMint\nDISTRIB_RELEASE=22.2\nDISTRIB_CODENAME=zara\nDISTRIB_DESCRIPTION=\"Linux Mint 22.2 Zara\"\n",
"/etc/debian_version": "trixie/sid\n"
},
"display-system": "x11",
"locale": "de_DE, UTF-8",
"PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
"RSYNC_OLD_ARGS": "(not set)",
"RSYNC_PROTECT_ARGS": "(not set)"
},
"python-setup": {
"python": "3.12.3 main Nov 6 2025 13:44:16 CPython GCC 13.3.0",
"python-executable": "/usr/bin/python3",
"python-executable-symlink": true,
"python-executable-resolved": "/usr/bin/python3.12",
"sys.path": [
"/usr/share/backintime/qt/plugins",
"/usr/share/backintime/common/plugins",
"/usr/share/backintime/plugins",
"/usr/share/backintime/common",
"/usr/lib/python312.zip",
"/usr/lib/python3.12",
"/usr/lib/python3.12/lib-dynload",
"/usr/local/lib/python3.12/dist-packages",
"/usr/lib/python3/dist-packages",
"/usr/lib/python3.12/dist-packages"
],
"qt": {
"Version": "PyQt 5.15.10 / Qt 5.15.13",
"Theme": "Mint-X",
"Theme Search Paths": [
"/home/UsernameReplaced/.icons",
"/home/UsernameReplaced/.local/share/icons",
"/usr/share/cinnamon/icons",
"/var/lib/flatpak/exports/share/icons",
"/usr/share/icons",
":/icons"
],
"Fallback Theme": "",
"Fallback Search Paths": []
}
},
"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.6p1 Ubuntu-3ubuntu13.14, OpenSSL 3.0.13 30 Jan 2024",
"sshfs": "3.7.3",
"encfs": "(no encfs)",
"shell": "/bin/bash",
"shell-version": "GNU bash, version 5.2.21(1)-release (x86_64-pc-linux-gnu)"
}
}Debug output
DEBUG: [common/backintime.py:589 argParse] Arguments: {'debug': True, 'command': 'backup', 'func': <function backup at 0x7c52dee4ce00>} | unknownArgs: []
DEBUG: [common/configfile.py:591 Config.setCurrentProfile] Change current profile: 1=Hauptprofil
DEBUG: [common/tools.py:186 initiate_translation] No language code. Use systems current locale.
DEBUG: [common/backintime.py:677 getConfig] config file: /home/boss/.config/backintime/config
DEBUG: [common/backintime.py:678 getConfig] share path: /home/boss/.local/share/backintime
DEBUG: [common/backintime.py:679 getConfig] profiles: 1=Hauptprofil
DEBUG: [common/pluginmanager.py:245 PluginManager.load] Register plugin path /usr/share/backintime/plugins
DEBUG: [common/pluginmanager.py:249 PluginManager.load] Probing plugin systrayiconplugin.py
DEBUG: [common/tools.py:735 is_Qt5_working] Qt5 probing result: exit code 2
DEBUG: [common/tools.py:738 is_Qt5_working] Qt5 probing stdout:
DEBUG: [common/tools.py:739 is_Qt5_working] Qt5 probing errout:
DEBUG: [common/qt5_probing.py:89 <module>] /usr/share/backintime/common/qt5_probing.py started... Call args: ['/usr/share/backintime/common/qt5_probing.py', '--debug']
DEBUG: [common/qt5_probing.py:90 <module>] Display system: x11
DEBUG: [common/qt5_probing.py:91 <module>] XDG_RUNTIME_DIR=/run/user/1000
DEBUG: [common/qt5_probing.py:92 <module>] XAUTHORITY=/home/boss/.Xauthority
DEBUG: [common/qt5_probing.py:93 <module>] QT_QPA_PLATFORM=($QT_QPA_PLATFORM is not set)
DEBUG: [common/qt5_probing.py:95 <module>] Current euid: 1000
DEBUG: [common/qt5_probing.py:126 <module>] isSystemTrayAvailable for Qt5: True
DEBUG: [common/qt5_probing.py:131 <module>] /usr/share/backintime/common/qt5_probing.py is terminating normally (exit code: 2)
DEBUG: [plugins/systrayiconplugin.py:76 init] System tray is available to show the BiT system tray icon
DEBUG: [common/pluginmanager.py:263 PluginManager.load] Add plugin systrayiconplugin.py
DEBUG: [common/pluginmanager.py:249 PluginManager.load] Probing plugin usercallbackplugin.py
DEBUG: [common/pluginmanager.py:249 PluginManager.load] Probing plugin notifyplugin.py
DEBUG: [common/pluginmanager.py:263 PluginManager.load] Add plugin notifyplugin.py
DEBUG: [common/applicationinstance.py:169 flockExclusiv] Trying to put an advisory lock on the flock file /home/boss/.local/share/backintime/worker.lock.flock
DEBUG: [common/applicationinstance.py:201 flockUnlock] Trying to remove the advisory lock from the flock file /home/boss/.local/share/backintime/worker.lock.flock
DEBUG: [common/snapshots.py:2027 Snapshots.flockExclusive] Set flock /tmp/backintime.lock
Back In Time
Version: 1.4.3
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.
Traceback (most recent call last):
File "/usr/share/backintime/common/backintime.py", line 1190, in <module>
startApp()
File "/usr/share/backintime/common/backintime.py", line 523, in startApp
args.func(args)
File "/usr/share/backintime/common/backintime.py", line 764, in backup
ret = takeSnapshot(cfg, force)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/backintime/common/backintime.py", line 97, in takeSnapshot
ret = snapshots.Snapshots(cfg).backup(force)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/backintime/common/snapshots.py", line 732, in backup
self.flockExclusive() # global flock to block backups from other profiles or users (and run them serialized)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/backintime/common/snapshots.py", line 2028, in flockExclusive
self.flock = open(self.GLOBAL_FLOCK, 'w')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/tmp/backintime.lock'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 228, in partial_apport_excepthook
return apport_excepthook(binary, exc_type, exc_obj, exc_tb)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 144, in apport_excepthook
os.open(pr_filename, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o640), "wb"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/var/crash/_usr_share_backintime_common_backintime.py.1000.crash'
Original exception was:
Traceback (most recent call last):
File "/usr/share/backintime/common/backintime.py", line 1190, in <module>
startApp()
File "/usr/share/backintime/common/backintime.py", line 523, in startApp
args.func(args)
File "/usr/share/backintime/common/backintime.py", line 764, in backup
ret = takeSnapshot(cfg, force)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/backintime/common/backintime.py", line 97, in takeSnapshot
ret = snapshots.Snapshots(cfg).backup(force)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/backintime/common/snapshots.py", line 732, in backup
self.flockExclusive() # global flock to block backups from other profiles or users (and run them serialized)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/backintime/common/snapshots.py", line 2028, in flockExclusive
self.flock = open(self.GLOBAL_FLOCK, 'w')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/tmp/backintime.lock'