Giter VIP home page Giter VIP logo

safe's Introduction

astrails-safe

Simple database and filesystem backups with S3 and Rackspace Cloud Files support (with optional encryption)

Build Status Code Climate

Motivation

We needed a backup solution that will satisfy the following requirements:

  • opensource
  • simple to install and configure
  • support for simple ‘tar’ backups of directories (with includes/excludes)
  • support for simple mysqldump of mysql databases
  • support for symmetric or public key encryption
  • support for local filesystem, Amazon S3, and Rackspace Cloud Files for storage
  • support for backup rotation. we don’t want backups filling all the diskspace or cost a fortune on S3 or Cloud Files

And since we didn't find any, we wrote our own :)

Contributions

The following functionality was contributed by astrails-safe users:

Thanks to all :)

Installation

sudo gem install astrails-safe --source http://gemcutter.org

Reporting problems

Please report problems at the Issues tracker

Usage

Usage:
   astrails-safe [OPTIONS] CONFIG_FILE
Options:
  -h, --help           This help screen
  -v, --verbose        be verbose, duh!
  -n, --dry-run        just pretend, don't do anything.
  -L, --local          skip remote storage, only do local backups

Note: CONFIG_FILE will be created from template if missing

Encryption

If you want to encrypt your backups you have 2 options:

  • use simple password encryption
  • use GPG public key encryption

IMPORTANT: some gpg installations automatically set 'use-agent' option in the default configuration file that is created when you run gpg for the first time. This will cause gpg to fail on the 2nd run if you don't have the agent running. The result is that 'astrails-safe' will work ONCE when you manually test it and then fail on any subsequent run. The solution is to remove the 'use-agent' from the config file (usually /root/.gnupg/gpg.conf) To mitigate this problem for the gpg 1.x series '--no-use-agent' option is added by defaults to the autogenerated config file, but for gpg2 is doesn't work. as the manpage says it: "This is dummy option. gpg2 always requires the agent." :(

For simple password, just add password entry in gpg section. For public key encryption you will need to create a public/secret keypair.

We recommend to create your GPG keys only on your local machine and then transfer your public key to the server that will do the backups.

This way the server will only know how to encrypt the backups but only you will be able to decrypt them using the secret key you have locally. Of course you MUST backup your backup encryption key :) We recommend also pringing the hard paper copy of your GPG key 'just in case'.

The procedure to create and transfer the key is as follows:

  1. run 'gpg --gen-key' on your local machine and follow onscreen instructions to create the key (you can accept all the defaults).

  2. extract your public key into a file (assuming you used [email protected] as your key email): gpg -a --export [email protected] > [email protected]

  3. transfer public key to the server scp [email protected] [email protected]:

  4. import public key on the remote system:

    $ gpg --import [email protected] gpg: key 45CA9403: public key "Test Backup [email protected]" imported gpg: Total number processed: 1 gpg: imported: 1

  5. since we don't keep the secret part of the key on the remote server, gpg has no way to know its yours and can be trusted. To fix that we can sign it with other trusted key, or just directly modify its trust level in gpg (use level 5):

    $ gpg --edit-key [email protected] ... Command> trust ... 1 = I don't know or won't say 2 = I do NOT trust 3 = I trust marginally 4 = I trust fully 5 = I trust ultimately m = back to the main menu

    Your decision? 5 ... Command> quit

  6. export your secret key for backup (we recommend to print it on paper and burn to a CD/DVD and store in a safe place):

    $ gpg -a --export-secret-key [email protected] > [email protected]

Example configuration

safe do
  verbose true

  local :path => "/backup/:kind/:id"

  s3 do
    key "...................."
    secret "........................................"
    bucket "backup.astrails.com"
    path "servers/alpha/:kind/:id"
  end

  cloudfiles do
    user "..........."
    api_key "................................."
    container "safe_backup"
    path ":kind/" # this is default
    service_net false
  end

  sftp do
    host "sftp.astrails.com"
    user "astrails"
    # port 8023
    password "ssh password for sftp"
  end

  gpg do
    command "/usr/local/bin/gpg"
    options  "--no-use-agent"
    # symmetric encryption key
    # password "qwe"

    # public GPG key (must be known to GPG, i.e. be on the keyring)
    key "[email protected]"
  end

  keep do
    local 20
    s3 100
    cloudfiles 100
    sftp 100
  end

  mysqldump do
    options "-ceKq --single-transaction --create-options"

    user "root"
    password "............"
    socket "/var/run/mysqld/mysqld.sock"

    database :blog
    database :servershape
    database :astrails_com
    database :secret_project_com do
      skip_tables "foo"
      skip_tables ["bar", "baz"]
    end

  end

  svndump do
    repo :my_repo do
      repo_path "/home/svn/my_repo"
    end
  end

  pgdump do
    options "-i -x -O"   # -i => ignore version, -x => do not dump privileges (grant/revoke), -O => skip restoration of object ownership in plain text format

    user "username"
    password "............"  # shouldn't be used, instead setup ident.  Current functionality exports a password env to the shell which pg_dump uses - untested!

    database :blog
    database :stateofflux_com
  end

  tar do
    options "-h" # dereference symlinks
    archive "git-repositories", :files => "/home/git/repositories"
    archive "dot-configs",      :files => "/home/*/.[^.]*"
    archive "etc",              :files => "/etc", :exclude => "/etc/puppet/other"

    archive "blog-astrails-com" do
      files "/var/www/blog.astrails.com/"
      exclude "/var/www/blog.astrails.com/log"
      exclude "/var/www/blog.astrails.com/tmp"
    end

    archive "astrails-com" do
      files "/var/www/astrails.com/"
      exclude ["/var/www/astrails.com/log", "/var/www/astrails.com/tmp"]
    end
  end
end

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Copyright

Copyright (c) 2010-2013 Astrails Ltd. See LICENSE.txt for details.

safe's People

Contributors

adam12 avatar hexa2k9 avatar markmansour avatar mattfawcett avatar minter avatar nclark avatar royosherove avatar seroy avatar sutherland avatar taasaa avatar tangofoxtrot avatar vitaly avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

safe's Issues

"pipe-streaming not supported for S3." received when path is supplied?

I took the basic template the Safe generates and added my usernames/passwords/etc, but whenever I attempt to run it I receive the "pipe-streaming not supported for S3." error. From looking at the code it seems like this should only occur when a path isn't supplied, but I'm supplying a path for both local and s3.

Here's the error output

XXX [~]# astrails-safe -v --dry-run sites_backup.conf
command: mysqldump --defaults-extra-file=/tmp/d20090704-17510-r5v8e1 /mysqldump.17510.0 -ceKq --single-transaction --create-options e2go_store|gzip
listing files /backup/mysqldump/e2go_store/090704-1955/mysqldump-e2go_store
/usr/lib/ruby/gems/1.8/gems/astrails-safe-0.2.0/lib/astrails/safe/s3.rb:16:in save': pipe-streaming not supported for S3. (RuntimeError) from /usr/lib/ruby/gems/1.8/gems/astrails-safe-0.2.0/lib/astrails/safe/sink.rb:8:inprocess'
from /usr/lib/ruby/gems/1.8/gems/astrails-safe-0.2.0/lib/astrails/safe/backup.rb:15:in run' from /usr/lib/ruby/gems/1.8/gems/astrails-safe-0.2.0/lib/astrails/safe/backup.rb:12:ineach'
from /usr/lib/ruby/gems/1.8/gems/astrails-safe-0.2.0/lib/astrails/safe/backup.rb:12:in run' from /usr/lib/ruby/gems/1.8/gems/astrails-safe-0.2.0/lib/astrails/safe.rb:49:insafe'
from /usr/lib/ruby/gems/1.8/gems/astrails-safe-0.2.0/lib/astrails/safe/config/node.rb:41:in each' from /usr/lib/ruby/gems/1.8/gems/astrails-safe-0.2.0/lib/astrails/safe/config/node.rb:41:ineach'
from /usr/lib/ruby/gems/1.8/gems/astrails-safe-0.2.0/lib/astrails/safe.rb:48:in safe' from /usr/lib/ruby/gems/1.8/gems/astrails-safe-0.2.0/lib/astrails/safe.rb:42:ineach'
from /usr/lib/ruby/gems/1.8/gems/astrails-safe-0.2.0/lib/astrails/safe.rb:42:in safe' from /home/e2go/sites_backup.conf:1 from /usr/lib/ruby/gems/1.8/gems/astrails-safe-0.2.0/bin/astrails-safe:50:inload'
from /usr/lib/ruby/gems/1.8/gems/astrails-safe-0.2.0/bin/astrails-safe:50:in main' from /usr/lib/ruby/gems/1.8/gems/astrails-safe-0.2.0/bin/astrails-safe:53 from /usr/bin/astrails-safe:19:inload'
from /usr/bin/astrails-safe:19

Here's the configuration:

safe do

  # backup file path (not including filename)
  # supported substitutions:
  #   :kind -> backup 'engine' kind, e.g. "mysqldump" or "archive"
  #   :id -> backup 'id', e.g. "blog", "production", etc.
  #   :timestamp -> current run timestamp (same for all the backups in the same 'run')
  # you can set separate :path for all backups (or once globally here)
  local do
    path "/backup/:kind/:id/:timestamp/"
  end

  ## uncomment to enable uploads to Amazon S3
  ## Amazon S3 auth (optional)
  ## don't forget to add :s3 to the 'store' list
  s3 do
     key "XXX"
     secret "XXX"
     bucket "backups.luma.co.nz"
     # path for uploads to S3. supports same substitution like :local/:path
     path ":kind/:id/:timestamp/" # this is default
  end

  ## alternative style:
  # s3 :key => YOUR_S3_KEY, :secret => YOUR_S3_SECRET, :bucket => S3_BUCKET

  ## uncomment to enable GPG encryption.
  ## Note: you can use public 'key' or symmetric password but not both!
  # gpg do
  #   # key "[email protected]"
  #   password "astrails"
  # end

  ## uncomment to enable backup rotation. keep only given number of latest
  ## backups. remove the rest
  keep do
     local 4 # keep 4 local backups
     s3 20 # keep 20 S3 backups
  end

  # backup mysql databases with mysqldump
  mysqldump do
    # you can override any setting from parent in a child:
    options "-ceKq --single-transaction --create-options"

    #user "XXX"
    #password "XXX"
     host "127.0.0.1"
    # port 3306
    socket "/var/run/mysqld/mysqld.sock"

    # database is a 'collection' element. it must have a hash or block parameter
    # it will be 'collected' in a 'databases', with database id (1st arg) used as hash key
    # the following code will create mysqldump/databases/blog and mysqldump/databases/mysql ocnfiguration 'nodes'

    # backup database with default values
#    database :e2go_store
#    database :divvi_divvideals

    # backup overriding some values
    database :e2go_store do
            user "e2go_store"
            password "XXX"

    #   # you can override 'partially'
    #   keep :local => 3
    #   # keep/local is 3, and keep/s3 is 20 (from parent)

    #   # local override for gpg password
    #   gpg do
    #     password "custom-production-pass"
    #   end

    #   skip_tables [:logger_exceptions, :request_logs] # skip those tables during backup
    end

  end

  # # uncomment to enable
  # # backup PostgreSQL databases with pg_dump
  # pgdump do
  #   option "-i -x -O"
  #
  #   user "markmansour"
  #   # password "" - leave this out if you have ident setup
  #
  #   # database is a 'collection' element. it must have a hash or block parameter
  #   # it will be 'collected' in a 'databases', with database id (1st arg) used as hash key
  #   database :blog
  #   database :production
  # end

  tar do
    # 'archive' is a collection item, just like 'database'
    # archive "git-repositories" do
    #   # files and directories to backup
    #   files "/home/git/repositories"
    # end

    # archive "etc-files" do
    #   files "/etc"
    #   # exlude those files/directories
    #   exclude "/etc/puppet/other"
    # end

    # archive "dot-configs" do
    #   files "/home/*/.[^.]*"
    # end

    # archive "blog" do
    #   files "/var/www/blog.astrails.com/"
    #   # specify multiple files/directories as array
    #   exclude ["/var/www/blog.astrails.com/log", "/var/www/blog.astrails.com/tmp"]
    # end

    # archive "site" do
    #   files "/var/www/astrails.com/"
    #   exclude ["/var/www/astrails.com/log", "/var/www/astrails.com/tmp"]
    # end

    # archive :misc do
    #   files [ "/backup/*.rb" ]
    # end
  end

end

hangs on sftp transfer

I'm able to create backups with astrails-safe just fine when I run backup locally. However, when I try to backup with sftp, it seems to hang on the sftp part. I have to kill the astrails-safe process manually. I know that it is hanging on the sftp part because when I kill the process, I see that the local copy of the backup was created. Additionally, I've used the same configuration specified in my astrails-safe backup settings to sftp to the other machine in shell, so I know its not a configuration issue. No clue how to debug the sftp process.

0.2.7 doesn't rotate backups starting with :timestamp

I'm running 0.2.7 and, with the paths that I've set up, it doesn't like deleting old backups from either S3 or local storage. The default configurations worked but since I've changed the paths, it's broken.

One possible issue is that the 'tar' operation "fails" (some files in the paths I give it are inaccessible), but this doesn't stop the tarball from being created with everything I want to have in it.

My configuration file follows:

safe do
local do
path "/home/backup/local-backups/:timestamp/"
end

s3 do
key "_"
secret "
_"
bucket "***-backups"

path ":timestamp/"

end

gpg do
options "--no-use-agent"
command "/usr/bin/gpg"
key "***"
end

keep do
local 4
s3 10
end

svndump do
repo :repo do
repo_path "/srv/svn/repo"
end
end

tar do
options "-h" # dereference symbolic links
archive "config" do
files ["/srv/svn/auth", "/srv/svn//.authz"]
# Note: a lot of these are protected, but get what we can.
files ["/var/backups/*"]
# ...
end
end
end

Option for rsync/s3sync

I'd love to be able to sync a directory rather than tar and upload the same thing if it never changes.
Has anyone looked into adding this to this gem?

View and Restore features

... are VERY needed. Fine instrument for backups, but sometimes it is very important to know "do we have backup of this file for 25-th december?" and to be able "Restore all for a week-ago state! Now! Go-go-go!!!".

S3 Rotation not working in 2.7?

Just testing astrails-safe with some very simple configs, and have managed to get 7 svnbackups on S3 with the following settings (only 5 in local). Am I missing something, or is this not quite right?

safe do
local :path => "/backups/:kind/:id"

keep do
local 5
s3 5
end

svndump do
repo :testrepo do
repo_path "/home/mark/testrepo"
end
end

s3 do
key "............"
secret "............"
bucket "........"
path ""
end

end

Many thanks,

Mark...

Issue with mysqldump

Hi, not sure if this is the right place for this. But I am having issues with the mysqldump configuration.

My database.yaml looks like the following

production:
adapter: mysql
encoding: utf8
reconnect: false
database: jtushman_tr_prod
pool: 5
username: jtushman_tr_prod
password: secret
host: 127.0.0.1

and my safe configuration looks like:

safe do
local :path => "/home/jtushman/backups/:kind/:id"

s3 do
key "my_key"
secret "my_secret"
bucket "backup.cairn.planner"
path ":kind/:id"
end

keep do
local 20
s3 100
end

mysqldump do
options "-ceKq --single-transaction --create-options"
user "jtushman_tr_prod"
password "secret"
host "127.0.0.1"
database :jtushman_tr_prod
end

end

When I run astrails-safe --verbose backup_db.rb
I get:
command: mysqldump --defaults-extra-file=/tmp/d20100106-14511-ysnqsz/mysqldump.14511.0 -ceKq --single-transaction --create-options tushman_tr_prod|gzip
mysqldump: Got error: 1044: Access denied for user 'jtushman_tr_prod'@'localhost' to database 'tushman_tr_prod' when selecting the database

Any ideas? What is wierd to me is the appending of @'localhost' to the user property.

Thanks!

Feature Request - Incremental backups

This is a wonderful gem our team is using for last 1-2 years. Since our db is expanding every day, we need to do only incremental backups for a certain time and then do one complete backup.

Mysql provides these features with a few options. Can you include them in this gem.

Thanks a lot
Sanchit Garg

Lacking net/sftp

Can't backup since version 0.2.2:

/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- net/sftp (LoadError)
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /home/user/.gem/ruby/1.8/gems/astrails-safe-0.2.2/lib/astrails/safe.rb:2
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /home/user/.gem/ruby/1.8/gems/astrails-safe-0.2.2/bin/astrails-safe:8
from /usr/bin/astrails-safe:19:in `load'
from /usr/bin/astrails-safe:19

Error when trying to back up to an EU S3 bucket

Steps to reproduce:

Create an s3 bucket in Europe
Attempt to back up to that bucket

Looks like it is related to this:

http://stackoverflow.com/questions/2569062/what-does-bucketalreadyownedbyyou-error-from-amazon-s3-actually-mean-i-cant-f

/usr/lib64/ruby/gems/1.8/gems/aws-s3-0.6.2/lib/aws/s3/error.rb:38:in raise': Your previous request to create the named bucket succeeded and you already own it. (AWS::S3::BucketAlreadyOwnedByYou) from /usr/lib64/ruby/gems/1.8/gems/aws-s3-0.6.2/lib/aws/s3/base.rb:72:inrequest'
from /usr/lib64/ruby/gems/1.8/gems/aws-s3-0.6.2/lib/aws/s3/base.rb:88:in put' from /usr/lib64/ruby/gems/1.8/gems/aws-s3-0.6.2/lib/aws/s3/bucket.rb:79:increate'
from /usr/lib64/ruby/gems/1.8/gems/astrails-safe-0.2.7/lib/astrails/safe/s3.rb:29:in save' from /usr/lib/ruby/1.8/benchmark.rb:308:inrealtime'
from /usr/lib64/ruby/gems/1.8/gems/astrails-safe-0.2.7/lib/astrails/safe/s3.rb:28:in save' from /usr/lib64/ruby/gems/1.8/gems/astrails-safe-0.2.7/lib/astrails/safe/sink.rb:8:inprocess'
from /usr/lib64/ruby/gems/1.8/gems/astrails-safe-0.2.7/lib/astrails/safe/backup.rb:15:in run' from /usr/lib64/ruby/gems/1.8/gems/astrails-safe-0.2.7/lib/astrails/safe/backup.rb:12:ineach'
from /usr/lib64/ruby/gems/1.8/gems/astrails-safe-0.2.7/lib/astrails/safe/backup.rb:12:in run' from /usr/lib64/ruby/gems/1.8/gems/astrails-safe-0.2.7/lib/astrails/safe.rb:53:insafe'
from /usr/lib64/ruby/gems/1.8/gems/astrails-safe-0.2.7/lib/astrails/safe/config/node.rb:51:in each' from /usr/lib64/ruby/gems/1.8/gems/astrails-safe-0.2.7/lib/astrails/safe/config/node.rb:51:ineach'
from /usr/lib64/ruby/gems/1.8/gems/astrails-safe-0.2.7/lib/astrails/safe.rb:52:in safe' from /usr/lib64/ruby/gems/1.8/gems/astrails-safe-0.2.7/lib/astrails/safe.rb:46:ineach'
from /usr/lib64/ruby/gems/1.8/gems/astrails-safe-0.2.7/lib/astrails/safe.rb:46:in safe' from /home/ec2-user/backup/astrails.conf:1 from /usr/lib64/ruby/gems/1.8/gems/astrails-safe-0.2.7/bin/astrails-safe:50:inload'
from /usr/lib64/ruby/gems/1.8/gems/astrails-safe-0.2.7/bin/astrails-safe:50:in main' from /usr/lib64/ruby/gems/1.8/gems/astrails-safe-0.2.7/bin/astrails-safe:53 from /usr/bin/astrails-safe:19:inload'
from /usr/bin/astrails-safe:19

Error copying database "-" in the name

Specify the database in the configuration file:

mysqldump do
options "-ceKq --single-transaction --create-options"

user "test"
password "test"
socket "/var/run/mysqld/mysqld.sock"

database :db-test1
database :db-test2
 end

I have an error at start astrails-safe -v -n astrails.conf

/var/lib/gems/1.8/gems/astrails-safe-0.2.7/lib/astrails/safe/config/builder.rb:19:in method_missing': undefined local variable or methodtest1' for #Astrails::Safe::Config::Builder:0xb6e06814 (NameError)
from /home/zar0ku1/backup/astrails.conf:15
from /var/lib/gems/1.8/gems/astrails-safe-0.2.7/lib/astrails/safe/config/node.rb:11:in instance_eval' from /var/lib/gems/1.8/gems/astrails-safe-0.2.7/lib/astrails/safe/config/node.rb:11:ininitialize'
from /var/lib/gems/1.8/gems/astrails-safe-0.2.7/lib/astrails/safe/config/node.rb:37:in new' from /var/lib/gems/1.8/gems/astrails-safe-0.2.7/lib/astrails/safe/config/node.rb:37:inset'
from /var/lib/gems/1.8/gems/astrails-safe-0.2.7/lib/astrails/safe/config/builder.rb:54:in method_missing' from /home/zar0ku1/backup/astrails.conf:8 from /var/lib/gems/1.8/gems/astrails-safe-0.2.7/lib/astrails/safe/config/node.rb:11:ininstance_eval'
from /var/lib/gems/1.8/gems/astrails-safe-0.2.7/lib/astrails/safe/config/node.rb:11:in initialize' from /var/lib/gems/1.8/gems/astrails-safe-0.2.7/lib/astrails/safe.rb:42:innew'
from /var/lib/gems/1.8/gems/astrails-safe-0.2.7/lib/astrails/safe.rb:42:in safe' from /home/zar0ku1/backup/astrails.conf:1 from /var/lib/gems/1.8/gems/astrails-safe-0.2.7/bin/astrails-safe:50:inload'
from /var/lib/gems/1.8/gems/astrails-safe-0.2.7/bin/astrails-safe:50:in main' from /var/lib/gems/1.8/gems/astrails-safe-0.2.7/bin/astrails-safe:53 from /usr/local/bin/astrails-safe:19:inload'
from /usr/local/bin/astrails-safe:19

Deploy: "Missing these required gems: astrails-safe"

Error message:
Missing these required gems: astrails-safe

In my environment.rb:
config.gem "astrails-safe", :version => '0.2.7'

The app works fine in development, but when I deploy the app fails to start, giving this trace:

0   /var/rails/teknet/releases/20100310181254/vendor/rails/railties/lib/initializer.rb      336     in `abort'
1   /var/rails/teknet/releases/20100310181254/vendor/rails/railties/lib/initializer.rb  336     in `check_gem_dependencies'
2   /var/rails/teknet/releases/20100310181254/vendor/rails/railties/lib/initializer.rb  170     in `process'
3   /var/rails/teknet/releases/20100310181254/vendor/rails/railties/lib/initializer.rb  113     in `send'
4   /var/rails/teknet/releases/20100310181254/vendor/rails/railties/lib/initializer.rb  113     in `run'
5   ./config/environment.rb     13  
6   /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb     31  in `gem_original_require'
7   /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb     31  in `require'
8   /opt/passenger-2.2.4/lib/phusion_passenger/railz/application_spawner.rb     303     in `preload_application'
9   /opt/passenger-2.2.4/lib/phusion_passenger/railz/application_spawner.rb     252     in `initialize_server'
10  /opt/passenger-2.2.4/lib/phusion_passenger/utils.rb     230     in `report_app_init_status'
11  /opt/passenger-2.2.4/lib/phusion_passenger/railz/application_spawner.rb     237     in `initialize_server'
12  /opt/passenger-2.2.4/lib/phusion_passenger/abstract_server.rb   193     in `start_synchronously'
13  /opt/passenger-2.2.4/lib/phusion_passenger/abstract_server.rb   162     in `start'
14  /opt/passenger-2.2.4/lib/phusion_passenger/railz/application_spawner.rb     213     in `start'
15  /opt/passenger-2.2.4/lib/phusion_passenger/spawn_manager.rb     261     in `spawn_rails_application'
16  /opt/passenger-2.2.4/lib/phusion_passenger/abstract_server_collection.rb    126     in `lookup_or_add'
17  /opt/passenger-2.2.4/lib/phusion_passenger/spawn_manager.rb     255     in `spawn_rails_application'
18  /opt/passenger-2.2.4/lib/phusion_passenger/abstract_server_collection.rb    80  in `synchronize'
19  /opt/passenger-2.2.4/lib/phusion_passenger/abstract_server_collection.rb    79  in `synchronize'
20  /opt/passenger-2.2.4/lib/phusion_passenger/spawn_manager.rb     254     in `spawn_rails_application'
21  /opt/passenger-2.2.4/lib/phusion_passenger/spawn_manager.rb     153     in `spawn_application'
22  /opt/passenger-2.2.4/lib/phusion_passenger/spawn_manager.rb     286     in `handle_spawn_application'
23  /opt/passenger-2.2.4/lib/phusion_passenger/abstract_server.rb   351     in `__send__'
24  /opt/passenger-2.2.4/lib/phusion_passenger/abstract_server.rb   351     in `main_loop'
25  /opt/passenger-2.2.4/lib/phusion_passenger/abstract_server.rb   195     in `start_synchronously'
26  /opt/passenger-2.2.4/bin/passenger-spawn-server     61  

mail notification

would it be possibile to have mail notifications of successfull/failed backups?

ERROR: Error installing astrails-safe: ERROR: Failed to build gem native extension.

I tried to install and get error.

[root@hostname ~]# sudo gem install astrails-safe --source http://gemcutter.org
Building native extensions. This could take a while...
ERROR: Error installing astrails-safe:
ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/ruby.h

Gem files will remain installed in /usr/lib64/ruby/gems/1.8/gems/json-1.8.0 for inspection.
Results logged to /usr/lib64/ruby/gems/1.8/gems/json-1.8.0/ext/json/ext/generator/gem_make.out

My config:

  1. cat /etc/redhat-release
    CentOS release 6.4 (Final)
  2. uname -a
    Linux hosname 2.6.32-358.6.2.el6.x86_64 #1 SMP Thu May 16 20:59:36 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
  3. ruby -v
    ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
    UPD1:
  4. gem -v
    2.1.5

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.