Skip to content

Instantly share code, notes, and snippets.

View will-r's full-sized avatar

William Ross will-r

  • Spanner
  • Lake District, England
View GitHub Profile
@will-r
will-r / mongodb-s3-backup.sh
Created July 20, 2018 21:41 — forked from eladnava/mongodb-s3-backup.sh
Automatically backup a MongoDB database to S3 using mongodump, tar, and awscli (Ubuntu 14.04 LTS)
#!/bin/sh
# Make sure to:
# 1) Name this file `backup.sh` and place it in /home/ubuntu
# 2) Run sudo apt-get install awscli to install the AWSCLI
# 3) Run aws configure (enter s3-authorized IAM user and specify region)
# 4) Fill in DB host + name
# 5) Create S3 bucket for the backups and fill it in below (set a lifecycle rule to expire files older than X days in the bucket)
# 6) Run chmod +x backup.sh
# 7) Test it out via ./backup.sh
### Keybase proof
I hereby claim:
* I am will-r on github.
* I am will_r (https://keybase.io/will_r) on keybase.
* I have a public key whose fingerprint is 66C0 F7F7 03E8 4061 BCE5 FC08 E2E9 A61C 5BCD 3D73
To claim this, I am signing this object:
{
"app": 22,
"channel": "broadcastMessages",
"etag": "682995b531428500ed62e24b61c96234",
"created_at": 1397553889911,
"content": {
"id": "f8ea1bef-2a58-499f-b0b8-8e743cffdde4",
"channel": "13b78ea9-e1f9-4f29-84d2-3efb69f61743",
"title": {
"ar": "اختبار رسالة",
@will-r
will-r / tag_profile.csv
Created November 18, 2011 14:18
Radius tag names by load
%Total %Self Total Self Wait Child Calls Name Line
    0 0 0 0 1/84 Array#each
    11.6 0 0 11.6 83/84 Radiant::Taggable#render_tag 40
93.53% 0% 11.6 0 0 11.6 84
    11.55 0 0 11.55 10/10 StandardTags#tag:snippet
    9.52 0 0 9.52 1/1 StylesheetTags#tag:stylesheet
    0.63 0 0 0.63 1/1 JavascriptTags#tag:javascript
    0.33 0 0 0.33 5/5 AssetTags#tag:assets
    0.32 0 0 0.32 1/1 AssetTags#tag:assets:each
    0.3 0 0 0.3 1/1 AssetTags#tag:asset_list
@will-r
will-r / booting.graph.txt
Created November 10, 2011 09:36
profiling radiant 1.rc3: graphs
Thread ID: 2249527720
Total Time: 0.057831
%total %self total self wait child calls Name
--------------------------------------------------------------------------------
100.00% 0.03% 0.06 0.00 0.00 0.06 1 <Module::Radiant>#profile (./script/../config/boot.rb:21} ./script/../config/boot.rb:21
0.06 0.00 0.00 0.06 1/1 Radiant::Boot#run
0.00 0.00 0.00 0.00 1/1 <Module::Radiant>#pick_boot
--------------------------------------------------------------------------------
0.06 0.00 0.00 0.06 1/1 <Module::Radiant>#profile
@will-r
will-r / booting.txt
Created November 10, 2011 09:23
profiling radiant 1.rc3
Thread ID: 2234923440
Total: 0.068740
%self total self wait child calls name
54.06 0.04 0.04 0.00 0.04 29 Kernel#require (ruby_runtime:0}
7.64 0.02 0.01 0.00 0.02 208 Gem::SourceIndex#add_spec (/Users/will/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/site_ruby/1.8/rubygems/deprecate.rb:54}
6.05 0.00 0.00 0.00 0.00 213 Kernel#caller (ruby_runtime:0}
5.63 0.01 0.00 0.00 0.00 213 <Module::Gem>#location_of_caller (/Users/will/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/site_ruby/1.8/rubygems.rb:676}
2.39 0.00 0.00 0.00 0.00 208 Gem::Specification#full_name (/Users/will/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/site_ruby/1.8/rubygems/specification.rb:1250}