Subj : Re: Backup script tuning To : MegaBrutal From : paulie420 Date : Sat Dec 17 2022 12:14:50 Me> 1. Try to write POSIX compliant scripts those don't depend on Bash. Use Me> checkbashisms to check whether you are using any Bash-only features. Me> Then you can safely use the #!/bin/sh shebang. (Unless you really need Me> some Bash features, but then you should declare that your script Me> requires Bash with the #!/bin/bash shebang. Unlikely you'll need Bash Me> for a backup script) Me> Me> 2. Use shellcheck to validate your code. It helps you point out gotchas Me> you might not think of. Me> Me> 3. This is just my taste, but for FS I need regular backups from, I'd Me> prefer to use BTRFS, then my script would make a snapshot of the Me> subvolume and transfer it to another disk via the btrfs send command. Me> Not only it would be more error-prone(as an entire subvolume would be Me> transferred differentially (in case you use -p to specify your previous Me> snapshot to use as a base) which either fails or succeeds, but you could Me> save previous states of your files snapshotted at specific points in Me> time without using significantly more disk space. Me> Me> 4. If I can't use BTRFS but need differential archives, I prefer to use Me> DAR. Me> While my backups are being handled via another method now, I appreciate you explaining some tips. I've always used /bin/bash, but only b/c thats how I've been taught. I'm still lingering on EXT4, but I know... I need to take the dive into something newer. One day. Thanks for the writeup, I've extracted the text and it'll remain in my helper folder. |07p|15AULIE|1142|07o |08......... --- Mystic BBS v1.12 A48 2022/07/15 (Linux/64) * Origin: 2o fOr beeRS bbs>>>20ForBeers.com:1337 (1337:3/129) .