New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Snapper does not find config file after a lot of modifications #879
Comments
You can try without DBus by using |
Thanks;
Here is the whole log file attached from when I started to change the config. And here is the config
|
Does Try |
I don't actually have a file I also looked for this file in a root snapshot, to see if I had removed it by mistake, but I don't find it there either!
There you go: ~ ❯ sudo strace -e trace=openat snapper --no-dbus list-configs
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/libsnapper.so.7", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/libncursesw.so.6", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/libdbus-1.so.3", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/libjson-c.so.5", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/libboost_thread.so.1.83.0", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/libboost_system.so.1.83.0", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/libxml2.so.2", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/libacl.so.1", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/libz.so.1", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/libmount.so.1", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/libbtrfsutil.so.1", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/libbtrfs.so.0", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/libsystemd.so.0", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/liblzma.so.5", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/libicuuc.so.74", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/libblkid.so.1", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/libcap.so.2", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/libgcrypt.so.20", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/liblz4.so.1", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/libzstd.so.1", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/libicudata.so.74", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/libgpg-error.so.0", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/gconv/gconv-modules.cache", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce nom)
openat(AT_FDCWD, "/usr/lib/gconv/gconv-modules", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/gconv/gconv-modules.d", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3
openat(AT_FDCWD, "/usr/lib/gconv/gconv-modules.d/gconv-modules-extra.conf", O_RDONLY|O_CLOEXEC) = 4
openat(AT_FDCWD, "/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/share/locale/fr_FR.UTF-8/LC_MESSAGES/snapper.mo", O_RDONLY) = -1 ENOENT (Aucun fichier ou dossier de ce nom)
openat(AT_FDCWD, "/usr/share/locale/fr_FR.utf8/LC_MESSAGES/snapper.mo", O_RDONLY) = -1 ENOENT (Aucun fichier ou dossier de ce nom)
openat(AT_FDCWD, "/usr/share/locale/fr_FR/LC_MESSAGES/snapper.mo", O_RDONLY) = -1 ENOENT (Aucun fichier ou dossier de ce nom)
openat(AT_FDCWD, "/usr/share/locale/fr.UTF-8/LC_MESSAGES/snapper.mo", O_RDONLY) = -1 ENOENT (Aucun fichier ou dossier de ce nom)
openat(AT_FDCWD, "/usr/share/locale/fr.utf8/LC_MESSAGES/snapper.mo", O_RDONLY) = -1 ENOENT (Aucun fichier ou dossier de ce nom)
openat(AT_FDCWD, "/usr/share/locale/fr/LC_MESSAGES/snapper.mo", O_RDONLY) = 3
openat(AT_FDCWD, "/etc/conf.d/snapper", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/share/terminfo/x/xterm-kitty", O_RDONLY) = 3
Configuration | Sous-volume
--------------+------------
+++ exited with 0 +++
~ ❯ |
The strace shows that |
Thank you. That helps. I tried to reproduce the initial bug, but failed to do so multiple times: Snapper's behavior looks very erratic here. The rough process is that starting from the default config and incrementally modifying it, I ended up introducing a mistake. Reverting to the last correct config (or even the default config), Snapper may (but not always!) fail to recognize it again. Generally though, this config seems problematic (more specifically with the permissions or
|
(I had closed the issue by mistake, apologies! :)) |
snapper "failed" to recognize the config since it was not setup correctly. I do not understand what the problem with QGROUP, ALLOW_USERS or ALLOW_GROUPS should benow. Maybe you face problems when those values are incorrect but that seems obviously. BTW QGROUP has nothing todo with permissions. |
As of now, the following config fails. Is there a mistake in it? ~ ❯ cat /etc/snapper/configs/root
###########
# GENERAL #
###########
SUBVOLUME = "/"
FSTYPE = "btrfs"
# Create hourly snapshots
TIMELINE_CREATE = "yes"
QGROUP = ""
# Size limites
SPACE_LIMIT = "0.2" # Take at most
FREE_LIMIT = "0.2" # Leave free
# Permissions
ALLOW_USERS = ""
ALLOW_GROUPS = ""
SYNC_ACL = "no"
# start comparing pre- and post-snapshot in background after creating
# post-snapshot
# BACKGROUND_COMPARISON="yes"
###########
# CLEANUP #
###########
# Timeline
TIMELINE_CLEANUP = "yes" # Cleanup hourly snapshots
TIMELINE_MIN_AGE = "168" # Keep all snapshots of last week (younger than 168 hours)
TIMELINE_LIMIT_HOURLY = "168"
TIMELINE_LIMIT_DAILY = "15"
TIMELINE_LIMIT_WEEKLY = "4"
TIMELINE_LIMIT_MONTHLY = "1"
TIMELINE_LIMIT_YEARLY = "0"
# Pre-post pairs
EMPTY_PRE_POST_CLEANUP = "no" # Do not delete pre-post pairs that have empty diff
### EMPTY_PRE_POST_MIN_AGE = "2880" # Keep all pre-post pairs of last month (that have empty diff)
# Number
NUMBER_CLEANUP="no"
### NUMBER_MIN_AGE="1800"
### NUMBER_LIMIT="50"
### NUMBER_LIMIT_IMPORTANT="10"
~ ❯ cat /etc/conf.d/snapper
## Path: System/Snapper
## Type: string
## Default: ""
# List of snapper configurations.
SNAPPER_CONFIGS="root"
~ ❯ sudo snapper list-configs
Configuration | Sous-volume
--------------+------------
~ ❯
Thanks. |
The same happens with the default config, despite ~ ❯ cat /etc/snapper/configs/root
# subvolume to snapshot
SUBVOLUME="/"
# filesystem type
FSTYPE="btrfs"
# btrfs qgroup for space aware cleanup algorithms
QGROUP=""
# fraction or absolute size of the filesystems space the snapshots may use
SPACE_LIMIT="0.5"
# fraction or absolute size of the filesystems space that should be free
FREE_LIMIT="0.2"
# users and groups allowed to work with config
ALLOW_USERS=""
ALLOW_GROUPS=""
# sync users and groups from ALLOW_USERS and ALLOW_GROUPS to .snapshots
# directory
SYNC_ACL="no"
# start comparing pre- and post-snapshot in background after creating
# post-snapshot
BACKGROUND_COMPARISON="yes"
# run daily number cleanup
NUMBER_CLEANUP="yes"
# limit for number cleanup
NUMBER_MIN_AGE="1800"
NUMBER_LIMIT="50"
NUMBER_LIMIT_IMPORTANT="10"
# create hourly snapshots
TIMELINE_CREATE="yes"
# cleanup hourly snapshots after some time
TIMELINE_CLEANUP="yes"
# limits for timeline cleanup
TIMELINE_MIN_AGE="1800"
TIMELINE_LIMIT_HOURLY="10"
TIMELINE_LIMIT_DAILY="10"
TIMELINE_LIMIT_WEEKLY="0"
TIMELINE_LIMIT_MONTHLY="10"
TIMELINE_LIMIT_YEARLY="10"
# cleanup empty pre-post-pairs
EMPTY_PRE_POST_CLEANUP="yes"
# limits for empty pre-post-pair cleanup
EMPTY_PRE_POST_MIN_AGE="1800"
~ ❯ cat /etc/conf.d/snapper
## Path: System/Snapper
## Type: string
## Default: ""
# List of snapper configurations.
SNAPPER_CONFIGS="root"
~ ❯ sudo snapper list-configs
Configuration | Sous-volume
--------------+------------
~ ❯ |
The first example used spaces around the '=' sign. That is not allowed (the syntax is basically bash where that is also not allowed). In general you should use The second one looks fine. But be aware that snapperd reads the file and modifying it with an external program can also cause trouble. Again, use |
Thank you very much for the help. I'd be happy to make a pull request for the manpages to advise the user to |
Problem is solved now. |
Hi. I am using snapper 0.10.7 on Arch Linux:
I have an entry
root
in/etc/snapper/configs
, but Snapper does not find it:I believe the entry is correct, it was generated in the past by running
sudo snapper -c root create-config /
. Snapper used to work on my machine, until I began to edit this file a lot to suit my needs (now I am just trying to make the default config work, though). Then, Snapper failed to find the file. I reinstalled Snapper, rebooted my machine, but it is still broken.(This may have something to do with DBus: I realized yesterday there was some kind of conflict (I did not take notes at the time so I cannot be more precise) with it. After a
sudo systemctl restart dbus-broker.service
, I could not re-start my session properly. I had to remove Snapper and the file/usr/share/dbus-1/system.d/org.opensuse.Snapper.conf
to fix my issue.)Please let me know if I can provide more information. Many thanks.
The text was updated successfully, but these errors were encountered: