Upgrade to Pro — share decks privately, control downloads, hide ads and more …

171025 English LT #4 - s3backup

lowply
October 25, 2017

171025 English LT #4 - s3backup

lowply

October 25, 2017
Tweet

More Decks by lowply

Other Decks in Technology

Transcript

  1. $ s3backup s3backup - backup directories to Amazon S3 Prerequirements:

    aws-cli, jq Author: @lowply Config location: ~/.config/s3backup.json Log location: ~/.log/s3backup Subcommands: - sync : Do sync - test : Dry run - clean: Remove all backups - size : Total size of the backup Visit https://github.com/lowply/s3backup to see config example.
  2. { "wifi_allow": [ "GitHub Guest", "SSID of your WiFi" ],

    "enabled": true, "profile": "aws_profile_name", "bucket": "bucket_name", "dir": "backup", "node":"hostname", "exclude":[ "*.DS_Store" ], "targets": [ { "path":"/var/www/html", "exclude":[ "log/*" ] } ] }
  3. { "wifi_allow": [ "GitHub Guest", "SSID of your WiFi" ],

    "enabled": true, "profile": "aws_profile_name", "bucket": "bucket_name", "dir": "backup", "node":"hostname", "exclude":[ "*.DS_Store" ], "targets": [ { "path":"/var/www/html", "exclude":[ "log/*" ] } ] } Wi-Fi Whitelist Global Exclusion
  4. <?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>jp.fixture.s3backup</string> <key>ProgramArguments</key> <array> <string>/usr/local/bin/s3backup</string> <string>sync</string> </array> <key>StartCalendarInterval</key> <dict> <key>Hour</key> <integer>12</integer> <key>Minute</key> <integer>0</integer> </dict> <key>StandardOutPath</key> <string>/tmp/s3backup/out.log</string> <key>StandardErrorPath</key> <string>/tmp/s3backup/err.log</string> </dict>
  5. $ s3backup size Bucket usage for the past 7 days:

    2017-10-06T00:37:00Z: 54GB 2017-10-07T00:37:00Z: 54GB 2017-10-08T00:37:00Z: 54GB 2017-10-09T00:37:00Z: 54GB 2017-10-10T00:37:00Z: 87GB 2017-10-11T00:37:00Z: 87GB 2017-10-12T00:37:00Z: 140GB 2017-10-13T00:37:00Z: 220GB 2017-10-14T00:37:00Z: 220GB 2017-10-15T00:37:00Z: 220GB 2017-10-16T00:37:00Z: 220GB 2017-10-17T00:37:00Z: 220GB 2017-10-18T00:37:00Z: 129GB