



This comparison to eCryptfs, which I originally considered, is very much relevant.Alternatives [to fscrypt] to consider
To protect an entire file system with one password, block device encryption with dm-crypt (LUKS) is generally a better option, as it ensures that all files on the file system are encrypted, and also that all file system metadata is encrypted. fscrypt is most useful to encrypt specific directories, or to enable different encrypted directories to be unlockable independently—for example, per-user encrypted home directories.
Compared to eCryptfs, the Linux native file encryption controlled by fscrypt does not use file system stacking, which makes it more memory-efficient. It also uses more up-to-date cryptography and does not require root privileges to set up, which avoids the need for setuid binaries. eCryptfs is also no longer being actively developed, and its largest users (Ubuntu and Chrome OS) have migrated to other solutions.


Code: Select all
cd /mnt/gentoo/home
tar -cvpzf backup.tar.gz --exclude=backup.tar.gz --one-file-system .
move file off partitionCode: Select all
cd /mnt/gentoo/home
move file back
sudo tar -xvpzf backup.tar.gz -C . --numeric-owner
TBH I have very little understanding of the tar command. It’s just something I copy/pasted from an article years ago that works for me. I’ve kept it saved in my notes.Hu wrote:Rather than create the file on the partition and then move it, why not create it where you want it to be? Likewise, there is no need to move the tar file back onto the encrypted partition before unpacking it.

Code: Select all
rsync -av /home/ /mnt/home/
mv /home /old_home