I'm setting up an encrypted backup using gocryptfs in reverse mode using rsync on a remote system. Since I need to backup just some of the directory in the backup area, I use the exclude wildcard option, but I get several error from rsync and I find myself with a non-working/non-forward mountable copy of my original data.
With several tests I tracked down the issue to be related to the initial '*' excluding pattern acting also on the .conf and .name files that gocryptfs generates in the encrypted filesystem. An explicit inclusion of the unencrypted version of the missing files is a possible workaround. This is quite easy for the gocryptfs.conf file (just force inclusion of '/.gocryptfs.reverse.conf'), but is not a viable solution for the long named files, since they don't have a specific name pattern to match.
Is there any update on this issue? I have ran to a similar problem while creating a backup and sadly just ignoring long file names isn't something I can easily do...
I'm setting up an encrypted backup using gocryptfs in reverse mode using rsync on a remote system. Since I need to backup just some of the directory in the backup area, I use the exclude wildcard option, but I get several error from rsync and I find myself with a non-working/non-forward mountable copy of my original data.
With several tests I tracked down the issue to be related to the initial
'*'
excluding pattern acting also on the.conf
and.name
files that gocryptfs generates in the encrypted filesystem. An explicit inclusion of the unencrypted version of the missing files is a possible workaround. This is quite easy for thegocryptfs.conf
file (just force inclusion of'/.gocryptfs.reverse.conf'
), but is not a viable solution for the long named files, since they don't have a specific name pattern to match.Steps to reproduce
Test setup:
Create the reverse config:
Mount and check the encrypted view:
So far so good. Now I want to view only the 'dir1' directory, so I mount with the exclude-wildcard option:
And things start going weird:
The
gocryptfs.conf
file is missing in the directory listing but it is actually there:The
.name
files associated with long filenames are present in the dir listing but not accessible:Explicitly adding exclusion for the conf and the long named file works as a workaround:
Now everything seems as expected: