You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cannot backup JuiceFS PVCs using restic without root #1982
Similar to lost+found on ext4, PVCs managed by JuiceFS have special files (.accesslog, .config, .stats) that are always owned by root, which prevents non-root restic backups (and presumably rclone, etc.) from progressing.
Having to switch the mover to privileged just to work around this issue is non-ideal, especially since these files shouldn't be backed up in the first place.
Steps to reproduce
Expected behavior
These files are skipped in the same way lost+found is skipped on ext4 (#1033). Ideally a more generic solution (#959) would be supported that allows skipping arbitrary files without needing workarounds per-filesystem.
Actual results
Additional context
I've applied the following patch on my own image to work around this issue:
--- /mover-restic/entry.sh+++ /mover-restic/entry.sh@@ -80,7 +80,7 @@ function check_var_defined {
function check_contents {
echo "== Checking directory for content ==="
- DIR_CONTENTS="$(ls -A "${DATA_DIR}" --ignore="lost+found")"+ DIR_CONTENTS="$(ls -A "${DATA_DIR}" --ignore="lost+found" --ignore=".accesslog" --ignore=".config" --ignore=".stats")"
if [ -z "${DIR_CONTENTS}" ]; then
echo "== Directory is empty skipping backup ==="
exit 0
@@ -154,7 +154,7 @@ function ensure_initialized {
function do_backup {
echo "=== Starting backup ==="
pushd "${DATA_DIR}"
- "${RESTIC[@]}" backup --host "${RESTIC_HOST}" --exclude='lost+found' .+ "${RESTIC[@]}" backup --host "${RESTIC_HOST}" --exclude='lost+found' --exclude='.accesslog' --exclude='.config' --exclude='.stats' .
popd
}
JuiceFS recreates three virtual files at every mount of the volume (they are FUSE properties of the mount, not files on the volume):
.accesslog — an endless stream with no EOF
.stats — on-demand virtual file
.config — virtual file
restic backup . walks the directory and tries to read .accesslog, which never reaches EOF. The mover stays in Running indefinitely (observed: 45 min with ~0 CPU and no network progress before we killed it). We also confirmed --exclude is not configurable through the VolSync CRD (no excludedPaths field for the restic mover in the v0.16.0 CRD spec), so there is no user-side workaround.
We also tested:
Snapshot-based copyMethod: Clone/Snapshot → does not help: the mover still mounts the cloned PVC, and juicefs recreates .accesslog on that mount too.
moverSecurityContext with fsGroup/runAsUser → irrelevant, the file is an endless stream regardless of permissions.
What we use instead (works reliably): a dedicated CronJob that mounts the same PVC and runs restic backup /source --exclude=.stats --exclude=.config --exclude=.accesslog. The excludes make the backup complete in seconds/minutes depending on data size.
Suggestion
Either of the following would fix this for FUSE filesystems with virtual files:
Activity
Yub0 commentedon Aug 27, 2026
Additional data point from a JuiceFS CSI (v0.28) + VolSync 0.16.0 deployment on k3s (Elastic Metal bare metal, RWO CSI PVCs):
We hit a harder variant of this: the mover doesn't fail on permissions, it hangs forever, even when running as root.
Root cause analysis
mover-restic/entry.sh(v0.16.0, line 157):JuiceFS recreates three virtual files at every mount of the volume (they are FUSE properties of the mount, not files on the volume):
.accesslog— an endless stream with no EOF.stats— on-demand virtual file.config— virtual filerestic backup .walks the directory and tries to read.accesslog, which never reaches EOF. The mover stays inRunningindefinitely (observed: 45 min with ~0 CPU and no network progress before we killed it). We also confirmed--excludeis not configurable through the VolSync CRD (noexcludedPathsfield for the restic mover in the v0.16.0 CRD spec), so there is no user-side workaround.We also tested:
copyMethod: Clone/Snapshot→ does not help: the mover still mounts the cloned PVC, and juicefs recreates.accesslogon that mount too.moverSecurityContextwith fsGroup/runAsUser → irrelevant, the file is an endless stream regardless of permissions.What we use instead (works reliably): a dedicated CronJob that mounts the same PVC and runs
restic backup /source --exclude=.stats --exclude=.config --exclude=.accesslog. The excludes make the backup complete in seconds/minutes depending on data size.Suggestion
Either of the following would fix this for FUSE filesystems with virtual files:
excludedPaths/resticOptionson the restic mover spec (overlaps with Support excludes in restic mover #677), orlost+found(they are filesystem properties, analogous tolost+found).