Você pode querer usar o EncFS e sua opção --reverse
. Aqui está uma citação da man page:
--reverse
Normally EncFS provides a plaintext view of data on demand. Nor‐
mally it stores enciphered data and displays plaintext data. With
--reverse it takes as source plaintext data and produces enciphered
data on-demand. This can be useful for creating remote encrypted
backups, where you do not wish to keep the local files unencrypted.
For example, the following would create an encrypted view in
/tmp/crypt-view.
encfs --reverse /home/me /tmp/crypt-view
You could then copy the /tmp/crypt-view directory in order to have
a copy of the encrypted data.
You must also keep a copy of the
file /home/me/.encfs6
which contains the filesystem information.
Together, the two can be used to reproduce the unencrypted data:
ENCFS5_CONFIG=/home/me/.encfs6 encfs /tmp/crypt-view /tmp/plain-view
Now /tmp/plain-view contains the same data as /home/me
Note that --reverse mode only works with limited configuration
options, so many settings may be disabled when used.
Especialmente se os arquivos já estiverem em sua casa criptografada, essa seria uma boa solução para evitar ter uma segunda cópia criptografada e não precisar gerenciar duas pastas criptografadas. Basta manter o arquivo de configuração do EncFS .encfs6