Skip to content
A magic bash script I use to backup my laptop
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
backup.sh

README.md

Magic bash backup script, read more here

You can create a new script to store your settings

#!/bin/bash

SOURCE=$HOME/Documents/Work
SSH_HOST="ruiabreu@atnog"
SSH_PATH="/home/ruiabreu/backups/"

. backup.sh

You can also use this script to backup to another location on your hardrive. Here is my example script, that accepts the destination as an argument.

#!/bin/bash

if [ "$#" != "1" ]; then
	echo "Usage: backup-home /dst/base/path"
	exit 1
fi

SOURCE=$HOME
DSTPATH=$1

. backup.sh
You can’t perform that action at this time.