Last active
January 26, 2021 03:16
-
-
Save dlo/6649e7a979968207e9f0 to your computer and use it in GitHub Desktop.
I guess this is a pretty good OS X tarsnap configuration.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Recommended options | |
humanize-numbers | |
# Tarsnap cache directory | |
cachedir /usr/local/tarsnap-cache | |
# Tarsnap key file | |
keyfile ~/.tarsnap/tarsnap.key | |
# Don't archive files which have the nodump flag set | |
nodump | |
# Print statistics when creating or deleting archives | |
print-stats | |
# Create a checkpoint once per GB of uploaded data. | |
checkpoint-bytes 1G | |
# Exclude files and directories matching specified patterns | |
exclude Libraries/ | |
exclude Dropbox/ | |
exclude Library/ | |
exclude Music/ | |
exclude Public/ | |
exclude *.app/ | |
exclude Documents/Projects/ | |
exclude Applications/ | |
exclude Applications (Parallels)/ | |
exclude Creative Cloud Files/ | |
exclude Documents/Virtual Machines.localized/ | |
# Developer Trash | |
exclude .cache/ | |
exclude .cocoapods/ | |
exclude .gem/ | |
exclude .heroku/ | |
exclude .itmstransporter/ | |
exclude .node-gyp/ | |
exclude .npm/ | |
exclude .rbenv/ | |
exclude .plugman/ | |
exclude .dropbox/ | |
exclude Documents/dotfiles/.git | |
# Random trash files | |
exclude $RECYCLE.BIN | |
exclude *.cer | |
exclude *.ini | |
exclude *.mobileprovision | |
exclude *.tmp | |
exclude ..* | |
exclude .DS_Store | |
exclude .Trash | |
exclude .Trash/ | |
exclude .localized | |
# Don't really need these | |
exclude *.zip | |
exclude *.pkg | |
exclude *.iso | |
exclude *.dmg | |
exclude *.exe | |
# Exclude SQL Backups, since they're already on S3 | |
exclude *.sql.bz2 | |
# Media Files are very large | |
exclude *.flv | |
exclude *.mp4 | |
exclude *.mov | |
exclude Pictures/ | |
exclude Documents/Photos/ | |
exclude Movies/ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.dlo.tarsnap</string> | |
<key>RunAtLoad</key> | |
<true/> | |
<key>EnableGlobbing</key> | |
<true/> | |
<key>StartCalendarInterval</key> | |
<dict> | |
<key>Minute</key> | |
<integer>0</integer> | |
</dict> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/bin/bash</string> | |
<string>-c</string> | |
<string>/usr/local/bin/tarsnap -cf "$(sysctl hw.model | awk '{ print $2 }') $(system_profiler SPHardwareDataType | awk '/Serial/ {print $4}') $(date +\%Y\%m\%d-\%H\%M)" .</string> | |
</array> | |
<key>WorkingDirectory</key> | |
<string>/Users/dan</string> | |
</dict> | |
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.dlo.tarsnapper</string> | |
<key>RunAtLoad</key> | |
<true/> | |
<key>StartCalendarInterval</key> | |
<dict> | |
<key>Minute</key> | |
<integer>30</integer> | |
</dict> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/bin/bash</string> | |
<string>-c</string> | |
<string>tarsnapper --target "$(sysctl hw.model | awk '{ print $2 }') $(system_profiler SPHardwareDataType | awk '/Serial/ {print $4}') \$date" --deltas 1h 1d 7d 30d 365d 18000d - expire</string> | |
</array> | |
<key>WorkingDirectory</key> | |
<string>/Users/dan</string> | |
<key>EnvironmentVariables</key> | |
<dict> | |
<key>PATH</key> | |
<string>/bin:/usr/bin:/usr/sbin:/usr/local/bin</string> | |
</dict> | |
</dict> | |
</plist> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment