https://github.com/equalsraf/magick-backup-script
A magic bash script I use to backup my laptop
https://github.com/equalsraf/magick-backup-script
Last synced: about 2 months ago
JSON representation
A magic bash script I use to backup my laptop
- Host: GitHub
- URL: https://github.com/equalsraf/magick-backup-script
- Owner: equalsraf
- Created: 2012-04-04T08:10:35.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2017-07-18T13:35:57.000Z (almost 9 years ago)
- Last Synced: 2025-03-06T12:31:07.498Z (about 1 year ago)
- Language: Shell
- Homepage:
- Size: 2.93 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Magic bash backup script, read more [here](http://ruiabreu.org/2011-05-24-the-magic-backup-script.html)
You can create a new script to store your settings
```bash
#!/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.
```bash
#!/bin/bash
if [ "$#" != "1" ]; then
echo "Usage: backup-home /dst/base/path"
exit 1
fi
SOURCE=$HOME
DSTPATH=$1
. backup.sh
```