https://github.com/adamtabrams/sink
A simple tool for maintaining a backup
https://github.com/adamtabrams/sink
Last synced: 12 months ago
JSON representation
A simple tool for maintaining a backup
- Host: GitHub
- URL: https://github.com/adamtabrams/sink
- Owner: adamtabrams
- Created: 2020-05-23T14:23:57.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-10-01T16:17:23.000Z (over 4 years ago)
- Last Synced: 2023-03-11T07:26:53.922Z (over 3 years ago)
- Language: Shell
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# About
Sink is a very simple backup tool. It relies on symbolic links to track
files and directories on you system. Then it uses rsync to save
backup copies of them to a destination directory. Rsync has the benifit
of detecting if a file has already been backed up or has been modified.
In these cases, rsynce only needs to transfer the difference between the
actual and the backed up copy. Sink is likely most useful when your backup
will reside on network attached storage or an external hard drive.
# Usage
Make a directory on you backup destination.
* `mkdir /Volumes/user/auto-backup`
Create a link to that directory.
* `./backup-to /Volumes/user/auto-backups`
You can place files the tracking directory.
* `mv ~/Downloads/bookmarks.html tracking`
Or create a link in tracking to a file or directory.
* `./start-tracking ~/Documents`
Then backup the data being tracked to its destination.
* `./sink`
You can also check logs from the backup process.
* `less history.log`
## Tips
* The backup destination must be present when you sink.
* You should only use absolute paths with this tool.
* You probably shouldn't track any directory that contains this tool.
## Scheduling
You could schedule this as a recurring job with cron.
A simplier way to automate backups might be to run sink at login with .profile.
Better yet, you could run sink 20 minutes after login.
This gives time for startup processes to finish and
for connecting to network storage.
* `sinklater() { sleep 1200; cd ~/repos/sink && ./sink; }; sinklater &>/dev/null &`