2012-11-27 47 views
0
備份rubygem河畔紅寶石有Postgres數據庫備份

我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" 

有誰能夠請與快速回復幫助?

+0

這是錯誤部分(堆棧溢出不允許發佈直到我刪除[警告]/[消息]或[錯誤])=> ModelError:備份描述爲my_backup (my_backup)失敗!發生錯誤導致此備份在完成之前中止。原因:OpenSSL :: PKey :: PKeyError不是公鑰「/home/sumanta/.ssh/id_rsa.pub」 – Sumanta

回答

0

那麼問題是Postgress - 你必須添加你的ip在pg_hba.conf =>主機所有ip信任/ md5(取決於版本)。並且感謝a_horse_with_no_name以適當的格式編輯它