Skip to content

Instantly share code, notes, and snippets.

View simontegelid's full-sized avatar

Simon Tegelid simontegelid

View GitHub Profile
@simontegelid
simontegelid / backup.sh
Last active September 7, 2023 08:50
A guide for setting up a Raspberry PI Zero W as a backup server, pulling files over SSH with rsync to an external USB HDD on schedule.
#!/bin/bash
# Backup script heavily influenced by
# http://www.mikerubel.org/computers/rsync_snapshots/#Incremental However, it
# is not deleting anything, just creating a new snapshot on each execution. The
# magic relies in the --link-dest flag to rsync which creates hard links to the
# folder of the last backup run and then synchronizes only the differences.
set -e
set -x

Keybase proof

I hereby claim:

  • I am simontegelid on github.
  • I am simontegelid (https://keybase.io/simontegelid) on keybase.
  • I have a public key ASDGHPfd7au9JKhBl_EKuBvfqspZg-2iuWuhYzZZfFgdHwo

To claim this, I am signing this object: