https://github.com/mhthies/rsync-backup
Simple but not too simple local backup script using rsync.
https://github.com/mhthies/rsync-backup
backup incremental-backups rsync
Last synced: about 1 year ago
JSON representation
Simple but not too simple local backup script using rsync.
- Host: GitHub
- URL: https://github.com/mhthies/rsync-backup
- Owner: mhthies
- Created: 2016-05-18T11:00:01.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-09-28T07:05:36.000Z (almost 10 years ago)
- Last Synced: 2025-02-14T07:20:06.310Z (over 1 year ago)
- Topics: backup, incremental-backups, rsync
- Language: Shell
- Size: 6.84 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# rsync-backup
A simple but not too simple backup script based on rsync.
Including incremental snapshot backups using hardlinks, weekly and monthly snapshots, automatic backup rotation
(deletion of old backups, while preserving monthly snapshots), interactive dryrun storing transaction list, interactive
option to continue unfinished backups and passing of custom filter (exclude) file.
## Usage
From the commandline help (`rsync-backup.sh -h`):
```
Usage:
rsync-backup.sh -s -d [-i] [-f ]
Options:
-s
Source directory. This is the source folder, that will be
backuped.
Warning: The source path must not include a trailing slash.
-d
Destination directory. The backups are stored in sub-directories
of the destination directory. Each run of this backup script will
create a new folder here containing a full snapshot of the source
direcotry.
There will also be folders containing weekly and monthly backups
of the source directory. All unchanged files are only stored once
on drive and hardlinked between all those folders.
Warning: The destination path must not include a trailing slash.
-f (optional)
Path to filter file. This file will be passed to rsync with the
--exclude-from option. It should contain relative paths inside
the source directory, that will be excluded from backup.
-i (optional)
Disable interactive mode. The user will not be asked for a dry run
or to continue an incomplete backup.
-h
Show this help message and exit without doing anything.
```
## Tips
You may want to edit the constant definitions in the first lines of the script.
If you use this script for backups to a file system without user/group/permissions support (e.g. NTFS without user
mapping), rsync will allways copy every file, due to the permissions mismatch. In that case add the following options
to RSYNC_OPTIONS: `--no-perms --no-owner --no-group`.