A cronjob copies files from a remote server (probably ext4) via rsync to a local encrypted partition (probably eCryptFS on top of ext4).

Now rsync throws errors for filenames that are longer than 143, which is expected due to the way filenames are encrypted on the target.

Since I can't change those parameters, I can't influence the files to be backed-up and there's only a handful of those that fail, I want to ignore / exclude the files in question.

I thought about running a find for files with names longer than 143 characters, writing to a temporary file and then using that as the --exclude-from for rsync.

But is there a more elegant and reliable way to do this I'm missing? I don't want the cronjob to skip more files than strictly necessary, but I also need it to run without errors to not trigger a monitoring alert.

  • I ended up using this find command to create a list of files to exclude stackoverflow.com/a/42944001 and wrote the list to a temporary file, then I used the --exclude-from option to reference the file when running rsync Jan 26, 2022 at 17:16


You must log in to answer this question.

Browse other questions tagged .