https://github.com/sfindeisen/rsync-backup
Personal, minimalistic, simple to use, space-efficient rsync(1) based backup solution.
https://github.com/sfindeisen/rsync-backup
backup bash rsync shell
Last synced: 5 months ago
JSON representation
Personal, minimalistic, simple to use, space-efficient rsync(1) based backup solution.
- Host: GitHub
- URL: https://github.com/sfindeisen/rsync-backup
- Owner: sfindeisen
- License: apache-2.0
- Created: 2018-02-12T18:22:05.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2025-01-16T15:32:49.000Z (over 1 year ago)
- Last Synced: 2025-01-16T16:59:25.015Z (over 1 year ago)
- Topics: backup, bash, rsync, shell
- Language: Shell
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rsync-backup
Personal, minimalistic, simple to use, space-efficient rsync(1) based backup
solution. Unchanged files are hardlinked to previous copies => they take no
extra space.
## Requirements
1. rsync (on a Debian-like operating system: `apt-get install rsync`)
2. target filesystem must support hardlinks (tested with: `ext3`)
## How to use
1. Set the source and destination environment variables. For example:
```
export BACKUP_SRC_DIR=/etc/
export BACKUP_DST_DIR=/mnt/my-external-storage/backup/etc/
```
2. [optional] adjust `rsync` exclude patterns if needed (`rsync-exclude.txt`)
3. Run the full backup at least once
```
rsync-backup-full.sh
```
4. Run the incremental backup whenever you want
```
rsync-backup-incremental.sh
```
## Restoring files
Navigate to your latest (or earlier) incremental backup directory
and just copy the files from there.
## Best practices
I run the full backup every couple of weeks. It helps limit the incremental
backup size.
## TODO
[ ] consider enabling -N (error: `rsync: This rsync does not support --crtimes (-N)`)
[ ] consider enabling -U