171025 English LT #4 - s3backup

171025 English LT #4 - s3backup

06cbb29d6f82c036bd77cba7d241c58c?s=128

Sho Mizutani

October 25, 2017
Tweet

Transcript

  1. 5.
  2. 18.

    $ 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.
  3. 19.
  4. 20.

    { "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/*" ] } ] }
  5. 21.

    { "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
  6. 23.

    <?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>
  7. 25.

    $ 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
  8. 32.