Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Then enter \q to quit
  • Finally import the data you copied over with scp
    psql _U postgres chf_hydra < chf_hydra_dump.sql

How to check the statefile

There are 3 parts to the state: sequence, counters, and seed. You need the correct combination of all three in order to have the right state. However, if you know you have two valid state files with the same origin you can do a rough comparison of their equivalence just by checking the sequence. To check sequence in our 7.2-based application:

$ cd /opt/sufia-project/current
$ bin/rails c production
> sf = ActiveFedora::Noid::Minter::File.new
> state = sf.read
> state[:seq]


To check in our 6.7-based application:

$ cd /opt/sufia-project/current
$ bin/rails c production
> sm = ActiveFedora::Noid::SynchronizedMinter.new
> state = {}
> ::File.open(sm.statefile, ::File::RDWR|::File::CREAT, 0644) do |f|
>   f.flock(::File::LOCK_EX)
>   state = sm.send(:state_for, f)
> end
> state[:seq]


To check sequence on a file that's not in the default location, pass the template and the filename when you create the object with 'new', e.g:

> sm = ActiveFedora::Noid::SynchronizedMinter.new(".reeddeeddk", "/var/sufia/minter-state")


Misc.

Postgres

You can get a list of all tables and fields with the command:

...