Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mxl/backup-tool
Script for incremental backup to OS X Sparse Bundle with rsync over ssh.
https://github.com/mxl/backup-tool
Last synced: about 21 hours ago
JSON representation
Script for incremental backup to OS X Sparse Bundle with rsync over ssh.
- Host: GitHub
- URL: https://github.com/mxl/backup-tool
- Owner: mxl
- Created: 2015-07-29T10:06:35.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-12-31T01:23:47.000Z (almost 7 years ago)
- Last Synced: 2024-11-05T10:15:12.056Z (about 2 months ago)
- Language: Shell
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# backup-tool
Script for incremental backup to OS X Sparse Bundle with rsync over ssh.## Prerequisites
Local host:
- install rsync;
- generate ssh key for root user;Remote host that will be backed up:
- run ssh daemon on port 22;
- install rsync on local and remote hosts;
- create `rsync` user on remote host:
`sudo useradd -m -s /bin/sh -N rsync`
- add this line to `sudoers` file:
`rsync ALL=(ALL) NOPASSWD: /usr/bin/rsync --host --sender -logDtprze.iLsf --numeric-ids . /`
- append public key of generated ssh key to `/home/rsync/.ssh/authorized_keys` on remote host.## Usage
Script must be runned as root.
Use following environment variables to configure script:
`host_NAME` (required) - domain or ip of remote host that will be backed up.
`DESTINATION` (required) - destination folder for backup.
`EXCLUDES` (optional) - path to file that contains paths that should be excluded from backup and is used in `--exclude-from` option of `rsync`.
`MYSQL_PASSWORD` (optional) - password for MySQL `root` user.
`PSQL_PASSWORD` (optional) - password for PostgreSQL `postgres` user.Run script:
```shell
host_NAME=example.com DESTINATION=~/mybackup EXCLUDES=~/mybackup/excludes.rsync ./backup.sh
```