试图通过备份rubygem nad ruby​​在rails上进行postgres数据库备份

时间:2012-11-27 07:02:38

标签: ruby-on-rails postgresql openssl backup public-key

我的my_backup.rb =>

   database PostgreSQL do |db|
      db.name               = "xxxxx"
      db.username           = "postgres"
      db.password           = "*********"
      db.host               = "localhost"
      db.port               = 5432
    end

    store_with SCP do |server|
      server.username     = "username"
      server.password     = "password"
      server.ip           = "xxx.xxx.xxx.xxx" 
      server.port         = 300
      server.path         = "~/backups/"
      server.keep         = 5
      #server.passive_mode = false
    end

有这个错误=>

CleanerError: Cleanup Warning
   The temporary backup folder '/home/ilfs/Backup/.tmp'
   appears to contain the package files from the previous backup!
   /home/ilfs/Backup/.tmp/2012.11.26.17.34.07.my_backup.tar
   These files will now be removed.

   Please check the log for messages and/or your notifications
   concerning this backup: 'Description for my_backup (my_backup)'
   The temporary files which had to be removed should not have existed.
 Performing Backup for 'Description for my_backup (my_backup)'!
 [ backup 3.0.27 : ruby 1.8.7 (2012-02-08 MBARI 8/0x6770 on patchlevel 358) [x86_64-linux], MBARI 0x6770, Ruby Enterprise Edition 2012.02 ]
 Database::PostgreSQL started dumping and archiving 'ces_dev'.
 Using Compressor::Bzip2 for compression.
   Command: '/bin/bzip2'
   Ext: '.bz2'
 Database::PostgreSQL Complete!
 Packaging the backup files...
 Splitter configured with a chunk size of 250MB.
 Packaging Complete!
 Cleaning up the temporary files...
 ModelError: Backup for Description for my_backup (my_backup) Failed!
   An Error occured which has caused this Backup to abort before completion.
   Reason: OpenSSL::PKey::PKeyError
   not a public key "/home/sumanta/.ssh/id_rsa.pub" 

有人可以帮忙快速回复吗?

1 个答案:

答案 0 :(得分:0)

问题出在postgres上 - 你必须在pg_hba.conf中添加你的ip => host all ip trust / md5(取决于版本)。并且感谢horse_with_no_name以适当的格式编辑它

相关问题