https://github.com/aaronvb/tarsnap_backup
Automated Tarsnap Backups and Rotations in Ruby
https://github.com/aaronvb/tarsnap_backup
Last synced: 9 months ago
JSON representation
Automated Tarsnap Backups and Rotations in Ruby
- Host: GitHub
- URL: https://github.com/aaronvb/tarsnap_backup
- Owner: aaronvb
- License: mit
- Created: 2014-11-26T19:46:44.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-08-02T21:10:02.000Z (almost 10 years ago)
- Last Synced: 2025-04-02T15:13:49.843Z (about 1 year ago)
- Language: Ruby
- Homepage:
- Size: 10.7 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
tarsnap_backup
==============
Automated Tarsnap Backups in Ruby
I created this script to manage my tarsnap backups. I included the launchd script to manage the execution of the backup on a 4 hour interval.
The launchd script goes in /Library/LaunchDaemons.
```terminal
$ launchctl load /Library/LaunchDaemons/com.aaronvb.tarsnap-backup.plist
$ launchctl start com.aaronvb.tarsnap-backup
```
Here's an example if you want setup more than one backup:
```ruby
#!/usr/bin/ruby
require_relative 'tarsnap'
# backups for project folder
#
settings = {
where_tarsnap: "/usr/local/bin/tarsnap",
log_path: "/Users/aaronvb/.tarsnap/logs",
to_backup: "/Users/aaronvb/projects",
backup_name: "projects",
prune_backups: 259200 # 3 days in seconds
}
tarsnap = Tarsnap.new(settings)
tarsnap.backup
# backups for document folder
#
settings = {
where_tarsnap: "/usr/local/bin/tarsnap",
log_path: "/Users/aaronvb/.tarsnap/logs",
to_backup: "/Users/aaronvb/Documents",
backup_name: "documents",
prune_backups: 259200 # 3 days in seconds
}
tarsnap = Tarsnap.new(settings)
tarsnap.backup
```
# Bitbar Support

### To Install
Add `tarsnap_bitbar.rb` to your Bitbar plugin folder.