简体   繁体   中英

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

My 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

And having this error=>

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"

can anybody please help with a quick reply?

Well the problem was with postgress - you have to add your ip in pg_hba.conf => host all ip trust/md5(depend on version). And thanks to a_horse_with_no_name for editing it in proper format

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM