What is the problem you are having with rclone?
I am attempting to sync the contents of a ZFS snapshot with Backblaze B2 using rclone. However, rclone seems to only "see" regular files at the top-level of the snapshot, ignoring directories and not recursing into the directories for the sync. When I invoke rclone, specifying the live system instead of the snapshot, but otherwise an identical invocation, I do get the desired behavior of picking up directories and their children for the sync.
Run the command 'rclone version' and share the full output of the command.
rclone v1.62.2-DEV
- os/version: debian 11.7 (64 bit)
- os/kernel: 6.1.0-0.deb11.7-amd64 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.20.4
- go/linking: dynamic
- go/tags: none
Which cloud storage system are you using? (eg Google Drive)
Backblaze B2 (Although, using the local file system as a destination seems to net similar results.)
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
rclone sync ./ backblaze_b2_recovery_crypt:
The rclone config contents with secrets removed.
[backblaze_b2_recovery]
type = b2
account = wouldntyouliketoknow
key = wouldntyouliketoknow
[backblaze_b2_recovery_crypt]
type = crypt
remote = backblaze_b2_recovery:mybucket/somewhere
password = wouldntyouliketoknow
password2 = wouldntyouliketoknow
[bb2_test]
type = b2
account = wouldntyouliketoknow
key = wouldntyouliketoknow
A log from the command with the -vv
flag
2023/06/16 17:06:07 DEBUG : rclone: Version "v1.62.2-DEV" starting with parameters ["rclone" "sync" "-vv" "--dry-run" "./" "backblaze_b2_recovery_crypt:"]
2023/06/16 17:06:07 DEBUG : Creating backend with remote "./"
2023/06/16 17:06:07 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2023/06/16 17:06:07 DEBUG : fs cache: renaming cache item "./" to be canonical "/srv/.zfs/snapshot/20230615235901-nightly/remote"
2023/06/16 17:06:07 DEBUG : Creating backend with remote "backblaze_b2_recovery_crypt:"
2023/06/16 17:06:07 DEBUG : Creating backend with remote "backblaze_b2_recovery:mybucket/somewhere"
2023/06/16 17:06:08 DEBUG : Couldn't decode error response: EOF
2023/06/16 17:06:09 DEBUG : README.txt: Size and modification time the same (differ by -433.449µs, within tolerance 1ms)
2023/06/16 17:06:09 DEBUG : README.txt: Unchanged skipping
2023/06/16 17:06:09 DEBUG : Encrypted drive 'backblaze_b2_recovery_crypt:': Waiting for checks to finish
2023/06/16 17:06:09 DEBUG : Encrypted drive 'backblaze_b2_recovery_crypt:': Waiting for transfers to finish
2023/06/16 17:06:09 DEBUG : Waiting for deletions to finish
2023/06/16 17:06:09 INFO : There was nothing to transfer
2023/06/16 17:06:09 NOTICE:
Transferred: 0 B / 0 B, -, 0 B/s, ETA -
Checks: 1 / 1, 100%
Elapsed time: 1.7s
2023/06/16 17:06:09 DEBUG : 8 go routines active
For some additional context when reading the logging information above, here is a listing of the snapshot I am trying to sync:
root@freyja:/srv/.zfs/snapshot/20230615235901-nightly/remote# ls -l
total 8
drwxr-xr-x 2 root root 2 May 4 22:30 aptly
drwxr-xr-x 2 root root 2 May 4 22:31 backups
drwxr-xr-x 2 root root 2 May 4 18:17 gitea
drwxr-xr-x 4 root root 4 May 13 10:16 localhost
drwxr-xr-x 2 root root 2 May 4 22:30 prometheous
-rw-r--r-- 1 root root 742 May 4 18:42 README.txt
drwxr-xr-x 2 root root 2 May 4 18:16 syncthing
I tried to specify a directory on the local file system as the destination just to see if I could elicit different behavior, but it seemed to behave the same as when specifying Backblaze B2 as the destination.
Then I ran rclone through strace and I saw a pattern of function calls that stood out to me, an excerpt of which can be found below. It would seem rclone is getting snagged on managing its epoll object. I'm not sure if this is a red herring, but epoll_ctl() seemed to succeed when I ran rclone from the live file system rather than the snapshot.
futex(0xc000700148, FUTEX_WAKE_PRIVATE, 1) = 1
newfstatat(AT_FDCWD, "/srv/.zfs/snapshot/20230611235901-nightly/remote/localhost/usrlocal", {st_mode=S_IFDIR|0755, st_size=2, ...}, 0) = 0
openat(AT_FDCWD, "/srv/.zfs/snapshot/20230611235901-nightly/remote/localhost/usrlocal", O_RDONLY|O_CLOEXEC) = 10
fcntl(10, F_GETFL) = 0x8000 (flags O_RDONLY|O_LARGEFILE)
fcntl(10, F_SETFL, O_RDONLY|O_NONBLOCK|O_LARGEFILE) = 0
epoll_ctl(4, EPOLL_CTL_ADD, 10, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, {u32=2964979272, u64=140341021376072}}) = -1 EPERM (Operation not permitted)
fcntl(10, F_GETFL) = 0x8800 (flags O_RDONLY|O_NONBLOCK|O_LARGEFILE)
fcntl(10, F_SETFL, O_RDONLY|O_LARGEFILE) = 0
getdents64(10, 0xc000564000 /* 2 entries */, 8192) = 48
getdents64(10, 0xc000564000 /* 0 entries */, 8192) = 0
close(10)