On 13/08/2020 12:14, rhkra...@gmail.com wrote:
I'm getting closer to setting up a consistent backup plan, backing up to an external USB drive. I'm wondering about a reasonable filesystem to use, I think I want to stay in the ext2/3/4 family, and I'm wondering if there is any good reason to use anything beyond ext2?
I use and recommend ext4. Journaling protects against filesystem metadata corruption, which can be caused by an electrical outage or system crash. ext3 also has journaling, but I see no reason to not use ext4. It is robust, widely deployed, and the default in Debian.
My backups are pigz-compressed tar archives, encrypted with gpg symmetric encryption, with a "pigz -0" outer wrapper to add a 32-bit checksum wrapper for convenient verification with "gzip -tv" or similar without requiring decryption. Archives are written to both external local storage and uploaded to cloud storage.
Because I have a small number of large backup files, I make backup filesystems to optimise for large files and maximise space: minimal journal, no reserved blocks, large file inode ratio, and no support for resizing while mounted. I also disable mount count and interval checking:
mkfs.ext4 -J size=4 -m 0 -T largefile4 -O "^resize_inode" /dev/sdb1 tune2fs -c 0 -i 0 -L Backup /dev/sdb1 I have this line in /etc/fstab: LABEL=Backup /media/backup ext4 noatime,noauto,user,errors=remount-ro 0 0 Kind regards, -- Ben Caradoc-Davies <b...@transient.nz> Director Transient Software Limited <https://transient.nz/> New Zealand