1

I have tried the rsync command from this post (with a different endpoint ofcourse):

Can a Raspberry Pi be used to create a backup of itself?

sudo rsync -avH --delete-during --delete-excluded --exclude-from=/usr/bin/rsync-exclude.txt / /mnt/mac-share/rsync/

With the following exluded files:

/proc/*
/sys/*
/dev/*
/boot/*
/tmp/*
/run/*
/mnt/*

.Trashes
._.Trashes
.fseventsd
.Spotlight-V100
.DS_Store
.AppleDesktop
.AppleDB
Network Trash Folder
Temporary Items

.bash_history
/etc/fake-hwclock.data
/var/lib/rpimonitor/stat/

The result seems to be what I want, but during the process I can see that it tries to access files that are excluded like this one, which would mean an ever growing tree-structure, were it to succed:

rsync: symlink "/mnt/mac-share/rsync/usr/share/zoneinfo/posix/Europe/Copenhagen" -> "../../Europe/Copenhagen" failed: Operation not supported (95)

This is just one of many files it tries to access in an excluded folder (and in this case on an excluded mount under the endpoint of /mnt/mac-share/rsync/).

Is this normal behaviour for rsync, to access files in folders that are excluded, which seems like a waste of time, or can it be done better somehow?

EDIT: rsync comes up with this at the end:

rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1183) [sender=3.1.1]

Laust
  • 13
  • 3

1 Answers1

0

during the process I can see that it tries to access files that are excluded like this one ... /mnt/mac-share/rsync/usr/share/zoneinfo/posix/Europe/Copenhagen

That's not during the scan of the sender (Pi) side; it is inside the destination folder, /mnt/mac-share/rsync/, and corresponds to /usr/share/zoneinfo/posix/Europe/Copenhagen, which is not excluded.

Although rsync has -l and -L options for specifying exactly what to do with symlinks (see man rsync, and also -k and -K; and perhaps search through the whole page for references to "symlink" with /symlink), what it does without such is ambiguous (and may have changed at some point version wise).

As far as I've noticed it does recreate symlinks by default, if the filesystem type on the other side permits this. For example, since vfat doesn't have such things, they cannot be recreated on a vfat fs and may throw this warning.

In this case, it may depend on how /mnt/mac-share was mounted, since presumably this is a network share. Again, as far as I've noticed this is okay with sshfs but may not be with something else, and may be subject to restrictions by the remote host.

goldilocks
  • 60,325
  • 17
  • 117
  • 234