Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/musikele/backupscript
My built-in time machine solution
https://github.com/musikele/backupscript
Last synced: 6 days ago
JSON representation
My built-in time machine solution
- Host: GitHub
- URL: https://github.com/musikele/backupscript
- Owner: musikele
- Created: 2016-11-03T10:51:19.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-09T20:17:23.000Z (over 7 years ago)
- Last Synced: 2023-08-26T10:11:12.768Z (over 1 year ago)
- Language: Shell
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Backup Script
--#What it does
This script will backup a directory (or your entire filesystem) in an incremental, space-efficient way. I use this script to backup my user directory,
usually this is what you need.the first time it will copy the whole directory on the external server, then it will copy only changed files.
For every backup, it will create a folder named after the date, for example `20161025-1452` (14:52 of 25/10/2016, dd/MM/yyyy). Next backups will hard link files that have not changed.
This script works even when you are not in your home network!
# Prerequisites
Don't forget to configure the server to accept ssh connections from your computer without password! The web is full of articles on how to do this, [here's one](http://www.linuxproblem.org/art_9.html).
# Install
1. edit file `com.michelenasti.scripts.backupscript.plist`
2. set the paths with your directories
3. launch ./install-mac.sh# Uninstall
just `./uninstall-mac.sh`
# How to launch?
Create a `start.sh` file, starting from `start-example.sh`:
```
$ cp start-example.sh start.sh
$ chmod +x start.sh
```Open the file `start.sh` and assign the right values to the variables.
Let's describe these variables with an example value
| Name | Example | Description |
| ---- | ------- | ----------- |
| `SOURCE` | `SOURCE=~` | will backup the home directory for the user.
| `DEST_DIRECTORY` | `DEST_DIRECTORY=personal_backup` | It is the directory where all the backups will be created. It will actually create another `backup` directory inside, so the actual backup directory will be `personal_backup/backup/...`
| `EXCLUDE_FILE` | `EXCLUDE_FILE=./exclude.cfg` | have a look to this file if you want to exclude something |
| `SSH_SERVER` | `SSH_SERVER='server.com'` | your server address
| `SSH_USER` | `SSH_USER="admin"` | a user that can log on the server.
| `SSH_OPTIONS` | `SSH_OPTIONS="-p 2222` | if you have any options to log in on your server, for example by using a different port or wathever you pass to the ssh command, you can specify it here.Once you have set up all these variables:
```
$ ./start.sh
```