簡體   English   中英

試圖通過備份rubygem nad ruby​​ on rails進行postgres數據庫備份

[英]Trying to have postgres database backup by backup rubygem nad ruby on rails

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

有人可以幫忙快速回復嗎?

那么問題出在postgress上-您必須在pg_hba.conf中添加您的IP =>托管所有ip trust / md5(取決於版本)。 還要感謝a_horse_with_no_name以正確的格式對其進行編輯

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM