Ignore files from user's homes while creating a crypted clone
Created by: markoceri
I had the need to exclude some files during the creation of the LUKS crypted copy.
With this feature is possible to choose which files are to be filtered from the crypted copy by using the template file exclude.list.cryptedclone
inside the directory /etc/penguins-eggs.d/exclude.list.d/.
The cryptedclone exclusion can be invoked in the same way as other exclusions, using the filters
flag of the command produce.
sudo eggs produce --filters=cryptedclone --cryptedclone
Keep in mind that the paths specified in the exclude.list.cryptedclone file are relative to each user's home directory.
Under the hood the command eggs produce
invokes the command eggs syncto
to create the LUKS file. I added to this command a new flag -e
or --exclude
that enable the cryptedclone exclusion.
sudo eggs syncto -e
I also took the opportunity to fix some small formatting issues and variable names, I hope I'm not considered too picky