Coder Social home page Coder Social logo

rbarman's People

Contributors

hamann avatar jordiromera avatar mk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

rbarman's Issues

RBarman::InvalidWalFileNameError for "00000002.history"

Hi,

The following command:

sudo -u barman /usr/bin/ruby /var/lib/barman/prog/check_barman/check-barman.rb -a last_wal_received -s db -w 1 -c 2

raises this following error:

/var/lib/gems/2.1.0/gems/rbarman-0.0.16/lib/rbarman/wal_file.rb:109:in `parse': name '00000002.history' has to be exactly 24 chars (RBarman::InvalidWalFileNameError)
	from /var/lib/gems/2.1.0/gems/rbarman-0.0.16/lib/rbarman/cli_command.rb:195:in `block in parse_wal_files_list'
	from /var/lib/gems/2.1.0/gems/rbarman-0.0.16/lib/rbarman/cli_command.rb:194:in `each'
	from /var/lib/gems/2.1.0/gems/rbarman-0.0.16/lib/rbarman/cli_command.rb:194:in `parse_wal_files_list'
	from /var/lib/gems/2.1.0/gems/rbarman-0.0.16/lib/rbarman/cli_command.rb:119:in `wal_files'
	from /var/lib/gems/2.1.0/gems/rbarman-0.0.16/lib/rbarman/cli_command.rb:71:in `block in backups'
	from /var/lib/gems/2.1.0/gems/rbarman-0.0.16/lib/rbarman/cli_command.rb:68:in `each'
	from /var/lib/gems/2.1.0/gems/rbarman-0.0.16/lib/rbarman/cli_command.rb:68:in `backups'
	from /var/lib/gems/2.1.0/gems/rbarman-0.0.16/lib/rbarman/cli_command.rb:54:in `backup'
	from /var/lib/gems/2.1.0/gems/rbarman-0.0.16/lib/rbarman/backup.rb:298:in `by_id'
	from /var/lib/barman/prog/check_barman/check-barman.rb:84:in `check_last_wal_received'
	from /var/lib/barman/prog/check_barman/check-barman.rb:243:in `<main>'

This is following a PITR recovery of the DB, I suspect this 00000002.history is perfectly valid

barman@barman2:~$ barman -v
2.3

Barman by 2ndQuadrant (www.2ndQuadrant.com)
barman@barman2:~$ barman list-files --target wal db 20230319T042101 | head
/var/lib/barman/db/wals/00000002.history
/var/lib/barman/db/wals/0000000200002E80/0000000200002E8000000075
/var/lib/barman/db/wals/0000000200002E80/0000000200002E8000000076
/var/lib/barman/db/wals/0000000200002E80/0000000200002E8000000077
/var/lib/barman/db/wals/0000000200002E80/0000000200002E8000000078
/var/lib/barman/db/wals/0000000200002E80/0000000200002E8000000079

I'm not sure on what to do to fix this...

A failed backup results in parse errors

Hi,

Exception is:

/usr/local/rvm/rubies/ruby-1.9.3-p545/lib/ruby/1.9.1/time.rb:267:in `parse': no time information in "None" (ArgumentError)
    from /usr/local/rvm/gems/ruby-1.9.3-p545/gems/rbarman-0.0.13/lib/rbarman/backup.rb:116:in `backup_start='
    from /usr/local/rvm/gems/ruby-1.9.3-p545/gems/rbarman-0.0.13/lib/rbarman/cli_command.rb:239:in `block in parse_backup_info_file'
    from /usr/local/rvm/gems/ruby-1.9.3-p545/gems/rbarman-0.0.13/lib/rbarman/cli_command.rb:235:in `each'
    from /usr/local/rvm/gems/ruby-1.9.3-p545/gems/rbarman-0.0.13/lib/rbarman/cli_command.rb:235:in `parse_backup_info_file'
    from /usr/local/rvm/gems/ruby-1.9.3-p545/gems/rbarman-0.0.13/lib/rbarman/cli_command.rb:69:in `block in backups'
    from /usr/local/rvm/gems/ruby-1.9.3-p545/gems/rbarman-0.0.13/lib/rbarman/cli_command.rb:68:in `each'
    from /usr/local/rvm/gems/ruby-1.9.3-p545/gems/rbarman-0.0.13/lib/rbarman/cli_command.rb:68:in `backups'
    from /usr/local/rvm/gems/ruby-1.9.3-p545/gems/rbarman-0.0.13/lib/rbarman/backups.rb:20:in `all'
    from ./check-barman.rb:78:in `check_last_wal_received'
    from ./check-barman.rb:202:in `<main>'

Problem is that a failed backup has no begin time, end time, as I'm not fluid in ruby I can't look for the exact code portion, I think you will be faster with that!

Here is the output from show-backup:

Backup 20140518T220002:
  Server Name       : xxx.xxx.xx
  Status            : FAILED
  Error:            : failure detecting data directory
bash-4.1$ barman show-backup xxx.xxx.xx 20140520T205254
Backup 20140520T205254:
  Server Name       : xxx.xxx.xx
  Status            : DONE
  PostgreSQL Version: 90302
  PGDATA directory  : /var/lib/pgsql/9.3/data

  Base backup information:
    Disk usage      : 10.1 GiB
    Timeline        : 1
    Begin WAL       : 00000001000000160000005A
    End WAL         : 00000001000000160000005A
    WAL number      : 1
    Begin time      : 2014-05-20 20:52:54.493173
    End time        : 2014-05-20 21:13:16.234241
    Begin Offset    : 40
    End Offset      : 2603104
    Begin XLOG      : 16/5A000028
    End XLOG        : 16/5A27B860

  WAL information:
    No of files     : 41
    Disk usage      : 211.6 MiB
    Last available  : 000000010000001600000083

  Catalog information:
    Retention Policy: VALID
    Previous Backup : 20140513T210335
    Next Backup     : - (this is the latest base backup)

After removing the failed backup the status is reported as it should

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.