Knowledge Base

Preserving for the future: Shell scripts, AoC, and more

PSA: Check your backups

Public service announcement

This is not a treatise on ensuring your backups work. That is a different topic for a different day.

You should make sure you backup what matters! Here are some things you probably want to exclude from your backups:

  • ~/.cache (temporary cache of anything on the OS for your user)
  • /mnt/public/Video/temp (where in-progress video conversion files live)
  • /var/lib/radicale/collections/*/*/*/.Radicale.cache
  • **/.~*.??? (to exclude usually LibreOffice lock files)
  • **/.*.swp (vim swap files)

Every so often you should run a reverse-sync in dry-run mode to see what you've changed/moved/removed/renamed since the last cleanup. Your Important document 5.odt might not be necessary, if you renamed it to Important-document-6.odt in the meantime.

For some reason I also found better reverse-sync logs when I omitted some of the famous -rlptgoDEA flags and just used:

time sudo rsync -nv -rltD ----exclude=/var/lib/radicale/collections/*/*/*/.Radicale.cache --exclude=**/.~*.??? --exclude=**/.*.swp /mnt/temp-mount/shares/ /var/server3/shares

With the ending slashes exactly as shown here. So just -rltD.

Comments