Skip to content
Branch: master
Go to file
Code

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

README.md

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.

$ 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:

#!/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.

About

Automated Tarsnap Backups and Rotations in Ruby

Resources

License

Releases

No releases published

Languages

You can’t perform that action at this time.