Flying to Iceland tomorrow, for a #Mailpile meetup!
Preparation: the pre-travel backup shuffle.
@HerraBRE too smol for the Bitcoin blockchain
@HerraBRE how often do you snapshot and with what tool/command?
@webmind Not as often as I should!
Media is USB storage, LUKS+EXT3/4.
Snapshots are made with rsync, in the mode where it compares the source with a previous snapshot, and the new snapshot ends up being mostly hard links to previously copied data.
Saves time and space, each snapshot is a complete browsable tree of files. This makes restoration of individual files is super easy, which I like.
The only downside is it breaks access times. If I cared I'd solve that with a read-only bind mound.
@HerraBRE can you give rsync line?
I commented my #rsync-based #backup script and put it in a gist.
https://gist.github.com/BjarniRunar/bd34c1e2e8101f6ff237add5db43eb78
I feel dirty. That should be on my own website. I hope it's useful!
๐พ ๐ ๐ฟ ๐ค
@HerraBRE @webmind Cool! I really like people sharing their snippets, it's always a pleasure to read someone elses work.
I can really recommend using `shellcheck` for any shell-scripting.
Some style aspects:
- `--exclude-file` is a great rsync feature, I can only recommend it
- Using `set -eu` improves writing style a lot
- trap is your friend
- Are you using any `bash` specific code? If not => `sh`
- false | true; echo $?
@HerraBRE Please don't read my Python, though! :D
@pl @webmind Thanks for the tips!
That shell script is the end point of multiple iterations, simplifying each time, to increase the odds I'll actually make backups, and that the backups will be useful and convenient.
Using a more complex tool is the opposite of what I want.
Different strokes for different folks, I say!
@HerraBRE That's a super badass solution.
@hummingrain The Unix home directory, and the way all settings live inside it, is a seriously undervalued invention!
@HerraBRE @hummingrain applies more generally to the filesystem as db. Love systems like dokuwiki
@HerraBRE Hey, would you have any good recommendations for keeping the Home folder synced between two Linux boxes? I have a laptop and a desktop that I want to keep up with each other, but Home seems like it might be trickier than most to sync.
@hummingrain I haven't tried.
The scary thing about syncing two filesystems that both actively change, is deletion. Unfortunately deleted files don't carry timestamps - so I am unaware of a safe automated filesystem-only way to distinguish between a new local file and a file that was deleted remotely. To resolve such questions one needs a log of some sort.
For that reason I'd be tempted to use something like git. But a home directory feels like it might be a bit big for git? Maybe not?
@HerraBRE That is something to chew on. Thank you!
@HerraBRE rad! Iceland is great this time of year. The 19-30km hike from the airport, not so much. :p
@skematica Iceland is always great!, said the Icelander.
You hiked from the airport? To Reykjavik? That's more like 40km. My condolences.
@HerraBRE never taken the hike myself. But a friend in Reykjavik told me about it.
Last time I travelled, I bought a 128GB USB 3.0 stick.
Sooo huuuuge! And yet so tiny. This thing is big enough that I can make multiple rsync snapshots of my full home directory. Encrypted, of course.
If my laptop gets lost or stolen, I buy a new one, install Linux, take this thing out of my pocket, cp -a . /home/bre and get back to work.
If I shop decisively enough, that's less than a day's hit to my productivity.