Discussion:
[Ledger-smb-users] Migrating from 1.3.30 to 1.5.3
bill Ott
2017-02-27 17:28:35 UTC
Permalink
I have successfully moved the database from ledgersmb 1.3.30 (postgresql
9.1.7) to ledgersmb 1.5.3 (postgresql 9.5.6). I can do SQL selects in
either and get the same results. When I attempt to access the database
from ledgersmb 1.5.3 I get an error saying that the is a Database mismatch.

The documentation hints "Please reload the templates into the database
after upgrading to 1.5. The database maintenance utility |setup.pl|
offers this functionality through it's "Load Templates" button. I cannot
find the referenced button. Any help appreciated.
--
Regards,
Bill Ott

Home: 919-363-0031
Cell: 919-434-7589
Email: Mailto:***@theotts.org
Website: http://www.theotts.org
Profile: http://www.linkedin.com/in/wbott
Erik Huelsmann
2017-02-27 18:10:10 UTC
Permalink
Hi Bill,
Post by bill Ott
I have successfully moved the database from ledgersmb 1.3.30 (postgresql
9.1.7) to ledgersmb 1.5.3 (postgresql 9.5.6). I can do SQL selects in
either and get the same results.
Great news! Thanks for sharing!
Post by bill Ott
When I attempt to access the database from ledgersmb 1.5.3 I get an
error saying that the is a Database mismatch.
"database mismatch" (or rather database match) is determined by looking at
the value in the output column if you run this query:

SELECT * FROM defaults WHERE setting_key = 'version';

What is the output this statement in your setup?
Post by bill Ott
The documentation hints "Please reload the templates into the database
after upgrading to 1.5. The database maintenance utility setup.pl offers
this functionality through it's "Load Templates" button. I cannot find the
referenced button. Any help appreciated.
While this advice is correct, it's not helpful in your case. It's talking
about the templates in the database from which invoices are printed. These
used to be stored on disk and now have to be loaded in the database. The
upgrade process *should* take care of that.


The advice you're looking for is that you can log in into your database
through setup.pl and click the "Rebuild" button. That *should* resolve your
issue, but I'm still very interested in hearing what the version number is
that the query above reports.
--
Bye,

Erik.

http://efficito.com -- Hosted accounting and ERP.
Robust and Flexible. No vendor lock-in.
bill Ott
2017-02-27 19:27:10 UTC
Permalink
Hi, Erik. Apparently I am not migrating this properly. The version from
the SQl select command was 1.3.30.

I moved the database by doing "pg_dumpall -c > dumpdata" from the 1.3.30
system but using the pg_dumpall program from the 1.5.3 system. I
then issued "psql -f dumpdata postgres" on the 1.5.3 system. Then
logging into the 1.5.3 system with psql and executing a "\l" shows all
of the databases. BUT, the version field from default is 1.3.30

Very odd the every select I tried on the database works correctly even
though the version is the old version.

How should I proceed? Can I just use SQl to modify the version field,
or would that just be making things worse?


Regards,
Bill Ott

Home: 919-363-0031
Cell: 919-434-7589
Email: Mailto:***@theotts.org
Website: http://www.theotts.org
Profile: http://www.linkedin.com/in/wbott
Post by Erik Huelsmann
Hi Bill,
I have successfully moved the database from ledgersmb 1.3.30
(postgresql 9.1.7) to ledgersmb 1.5.3 (postgresql 9.5.6). I can
do SQL selects in either and get the same results.
Great news! Thanks for sharing!
When I attempt to access the database from ledgersmb 1.5.3 I get
an error saying that the is a Database mismatch.
"database mismatch" (or rather database match) is determined by
SELECT * FROM defaults WHERE setting_key = 'version';
What is the output this statement in your setup?
The documentation hints "Please reload the templates into the
database after upgrading to 1.5. The database maintenance utility
|setup.pl <http://setup.pl>| offers this functionality through
it's "Load Templates" button. I cannot find the referenced
button. Any help appreciated.
While this advice is correct, it's not helpful in your case. It's
talking about the templates in the database from which invoices are
printed. These used to be stored on disk and now have to be loaded in
the database. The upgrade process *should* take care of that.
The advice you're looking for is that you can log in into your
database through setup.pl <http://setup.pl> and click the "Rebuild"
button. That *should* resolve your issue, but I'm still very
interested in hearing what the version number is that the query above
reports.
--
Bye,
Erik.
http://efficito.com <http://efficito.com/> -- Hosted accounting and ERP.
Robust and Flexible. No vendor lock-in.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Ledger-smb-users mailing list
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users
Erik Huelsmann
2017-02-27 21:27:51 UTC
Permalink
Hi Bill,
Post by bill Ott
Hi, Erik. Apparently I am not migrating this properly. The version from
the SQl select command was 1.3.30.
I moved the database by doing "pg_dumpall -c > dumpdata" from the 1.3.30
system but using the pg_dumpall program from the 1.5.3 system. I then
issued "psql -f dumpdata postgres" on the 1.5.3 system. Then logging into
the 1.5.3 system with psql and executing a "\l" shows all of the
databases. BUT, the version field from default is 1.3.30
Ok. That explains at least some of it. Which instructions have you been
using for your migration? Can you provide some details as to how you
handled each of the steps in the instructions? Having that information will
help me understand where you're currently at with your migration.
Post by bill Ott
Very odd the every select I tried on the database works correctly even
though the version is the old version.
Right. You made an exact copy of your database. Which means that all
queries should work as they did under 1.3.
Post by bill Ott
How should I proceed? Can I just use SQl to modify the version field, or
would that just be making things worse?
Just changing the number through an SQL statement will not help to resolve
the situation: the new software won't know it's talking to an old database
version, leaving them in Babylon.
--
Bye,

Erik.

http://efficito.com -- Hosted accounting and ERP.
Robust and Flexible. No vendor lock-in.
bill Ott
2017-02-28 04:49:32 UTC
Permalink
Eric, I am migrating to new hardware. I use a virtual machine running
the new OS as a test bed for each of the programs I am migrating. So,
starting over again is a 10 minute job. Stop the virtual machine, delete
the virtual machine file, copy the saved virtual machine file over and
restart the virtual machine. I then run this script (script7.sh) as root
on the virtual machine. Scripts1-6 are for other apps that I have
already tested on a virtual machine. When I get all of the scripts
running, I'll install a clean OS on the new hardware and run all of the
scripts.

Points of clarification

* "/home/wbostore/backup/wbointi7/stage/" is on the storage server and
contains the necessary data from the old server, as well as, new
required data for the new server.
* The soft references are for convenience (ln -s
/var/lib/pgsql/9.5/data/ /var/lib/pgsql/data)
* To work around getting the DB users from the 1.3.30 DB to work in
1.5.3 i changed the "peer" to "trust" (local all
all trust)

Any other changes are accidental and may be my problem. Thanks for
looking into this.



_______________________________________________

#!/bin/bash


NAME="wvointi7"
OS="CentOS_7"
LOADALL=1



#
# set up SMB Ledger- Postgres 9.5 service and Pass key
#
if [ 1 -eq $LOADALL ] ; then

cat > /etc/yum.repos.d/pgdg-95-centos.repo <<EOF
[pgdg95]
name=PostgreSQL 9.5 \$releasever - \$basearch
baseurl=https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-\$releasever-\$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-95

[pgdg95-source]
name=PostgreSQL 9.5 \$releasever - \$basearch - Source
failovermethod=priority
baseurl=https://download.postgresql.org/pub/repos/yum/srpms/9.5/redhat/rhel-\$releasever-\$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-95
EOF

cat > /etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-95 <<EOF
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.7 (GNU/Linux)

mQGiBEeD8koRBACC1VBRsUwGr9gxFFRho9kZpdRUjBJoPhkeOTvp9LzkdAQMFngr
BFi6N0ov1kCX7LLwBmDG+JPR7N+XcH9YR1coSHpLVg+JNy2kFDd4zAyWxJafjZ3a
9zFg9Yx+0va1BJ2t4zVcmKS4aOfbgQ5KwIOWUujalQW5Y+Fw39Gn86qjbwCg5dIo
tkM0l19h2sx50D027pV5aPsD/2c9pfcFTbMhB0CcKS836GH1qY+NCAdUwPs646ee
Ex/k9Uy4qMwhl3HuCGGGa+N6Plyon7V0TzZuRGp/1742dE8IO+I/KLy2L1d1Fxrn
XOTBZd8qe6nBwh12OMcKrsPBVBxn+iSkaG3ULsgOtx+HHLfa1/p22L5+GzGdxizr
peBuA/90cCp+lYcEwdYaRoFVR501yDOTmmzBc1DrsyWP79QMEGzMqa393G0VnqXt
L4pGmunq66Agw2EhPcIt3pDYiCmEt/obdVtSJH6BtmSDB/zYhbE8u3vLP3jfFDa9
KXxgtYj0NvuUVoRmxSKm8jtfmj1L7zoKNz3jl+Ba3L0WxIv4+bRBUG9zdGdyZVNR
TCBSUE0gQnVpbGRpbmcgUHJvamVjdCA8cGdzcWxycG1zLWhhY2tlcnNAcGdmb3Vu
ZHJ5Lm9yZz6IYAQTEQIAIAUCR4PySgIbIwYLCQgHAwIEFQIIAwQWAgMBAh4BAheA
AAoJEB8W0uFELfD4jnkAoMqd6ZwwsgYHZ3hP9vt+DJt1uDW7AKDbRwP8ESKFhwdJ
8m91RPBeJW/tMLkCDQRHg/JKEAgA64+ZXgcERPYfZYo4p+yMTJAAa9aqnE3U4Ni6
ZMB57GPuEy8NfbNya+HiftO8hoozmJdcI6XFyRBCDUVCdZ8SE+PJdOx2FFqZVIu6
dKnr8ykhgLpNNEFDG3boK9UfLj/5lYQ3Y550Iym1QKOgyrJYeAp6sZ+Nx2PavsP3
nMFCSD67BqAbcLCVQN7a2dAUXfEbfXJjPHXTbo1/kxtzE+KCRTLdXEbSEe3nHO04
K/EgTBjeBUOxnciH5RylJ2oGy/v4xr9ed7R1jJtshsDKMdWApwoLlCBJ63jg/4T/
z/OtXmu4AvmWaJxaTl7fPf2GqSqqb6jLCrQAH7AIhXr9V0zPZwADBQgAlpptNQHl
u7euIdIujFwwcxyQGfee6BG+3zaNSEHMVQMuc6bxuvYmgM9r7aki/b0YMfjJBk8v
OJ3Eh1vDH/woJi2iJ13vQ21ot+1JP3fMd6NPR8/qEeDnmVXu7QAtlkmSKI9Rdnjz
FFSUJrQPHnKsH4V4uvAM+njwYD+VFiwlBPTKNeL8cdBb4tPN2cdVJzoAp57wkZAN
VA2tKxNsTJKBi8wukaLWX8+yPHiWCNWItvyB4WCEp/rZKG4A868NM5sZQMAabpLd
l4fTiGu68OYgK9qUPZvhEAL2C1jPDVHPkLm+ZsD+90Pe66w9vB00cxXuHLzm8Pad
GaCXCY8h3xi6VIhJBBgRAgAJBQJHg/JKAhsMAAoJEB8W0uFELfD4K4cAoJ4yug8y
1U0cZEiF5W25HDzMTtaDAKCaM1m3Cbd+AZ0NGWNg/VvIX9MsPA==
=au6K
-----END PGP PUBLIC KEY BLOCK-----
EOF

#
# get the necessary perl modules
#
yum -y remove perl-DBD-Pg
yum -y install perl-CGI-Emulate-PSGI perl-CGI-Simple perl-Config-IniFiles
yum -y install perl-DBI perl-DateTime perl-DateTime-Format-Strptime
yum -y install perl-Digest-MD5 perl-File-MimeInfo perl-JSON-XS perl-starman
yum -y install perl-Locale-Maketext perl-App-cpanminus perl-YAML
yum -y install perl-Log-Log4perl perl-MIME-Lite perl-Math-BigInt-GMP
yum -y install perl-Moose perl-Number-Format perl-Plack
perl-Template-Toolkit
yum -y install perl-namespace-autoclean perl-MooseX-NonMoose perl-XML-Simple

cpan install CPAN
cpan install App::Info
cpan install Locale::Maketext::Lexicon
cpan install MIME::Base64
cpan install CGI::Simple
cpan install DBD::Pg

#
# set up postgres
#
yum -y remove postgresql
rm /var/lib/pgsql/data -Rf
yum -y install postgresql95-server postgresql95-devel postgresql95-libs
ln -s /var/lib/pgsql/9.5/data/ /var/lib/pgsql/data
/usr/pgsql-9.5/bin/postgresql95-setup initdb

export POSTGRES_HOME=/usr/pgsql-9.5

cat > /var/lib/pgsql/data/pg_hba.conf <<EOF
local all postgres peer
local all all trust
host all postgres 127.0.0.1/32 reject
host all postgres ::1/128 reject
host postgres,template0,template1 lsmb_dbadmin 127.0.0.1/32 md5
host postgres,template0,template1 lsmb_dbadmin ::1/128 md5
host postgres,template0,template1 all 127.0.0.1/32 reject
host postgres,template0,template1 all ::1/128 reject
host all all 127.0.0.1/32 md5
host all all ::1/128 md5
EOF

systemctl restart postgresql-9.5.service
cd /var/lib/pgsql/data
su postgres <<EOF
psql -f /home/wbostore/backup/wbointi7/stage/psqldump postgres
EOF
systemctl restart postgresql-9.5.service

#
# Install ledgersmb
#
cd /opt
cp /home/wbostore/backup/wbointi7/stage/ledgersmb-1.5.3.tar.gz /opt/
tar -xzf ledgersmb-1.5.3.tar.gz
rm -f *.gz

cd /opt/ledgersmb
cpanm --quiet --notest --with-feature=starman --installdeps .

ln -s /usr/local/bin/starman /usr/bin/starman

cp /opt/ledgersmb/conf/systemd/* /usr/lib/systemd/system/
cp /opt/ledgersmb/conf/ledgersmb.conf.default /opt/ledgersmb/ledgersmb.conf
chown root:root /opt/ledgersmb -Rf
sed -i 's/=WORKING_DIR/=\/opt\/ledgersmb/'
/usr/lib/systemd/system/starman-ledgersmb.service
sed -i 's/=WORKING_DIR/=\/opt\/ledgersmb/'
/usr/lib/systemd/system/plack-fcgi-ledgersmb.service
useradd -d /non-existent -r -U -c "LedgerSMB/Starman service system
user" ledgersmb

systemctl enable plack-fcgi-ledgersmb.service
systemctl enable starman-ledgersmb.service

systemctl start starman-ledgersmb.service

fi




Regards,
Bill Ott

Home: 919-363-0031
Cell: 919-434-7589
Email: Mailto:***@theotts.org
Website: http://www.theotts.org
Profile: http://www.linkedin.com/in/wbott
Post by Erik Huelsmann
Hi Bill,
Hi, Erik. Apparently I am not migrating this properly. The version
from the SQl select command was 1.3.30.
I moved the database by doing "pg_dumpall -c > dumpdata" from the
1.3.30 system but using the pg_dumpall program from the 1.5.3
system. I then issued "psql -f dumpdata postgres" on the 1.5.3
system. Then logging into the 1.5.3 system with psql and
executing a "\l" shows all of the databases. BUT, the version
field from default is 1.3.30
Ok. That explains at least some of it. Which instructions have you
been using for your migration? Can you provide some details as to how
you handled each of the steps in the instructions? Having that
information will help me understand where you're currently at with
your migration.
Very odd the every select I tried on the database works correctly
even though the version is the old version.
Right. You made an exact copy of your database. Which means that all
queries should work as they did under 1.3.
How should I proceed? Can I just use SQl to modify the version
field, or would that just be making things worse?
Just changing the number through an SQL statement will not help to
resolve the situation: the new software won't know it's talking to an
old database version, leaving them in Babylon.
--
Bye,
Erik.
http://efficito.com <http://efficito.com/> -- Hosted accounting and ERP.
Robust and Flexible. No vendor lock-in.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Ledger-smb-users mailing list
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users
Erik Huelsmann
2017-03-06 22:04:44 UTC
Permalink
Hi Bill,

Thanks for coming to the chat room as suggested by David. It's great that
we were able to work out the problems you were running into. We'll be
including the required fixes in the next (and following) 1.5 release for
others to enjoy.

Summarizing the problems we were having:
1. The migration process in 'setup.pl' complained about errors
2. The migration from 1.3 to 1.5 had two bugs
3. You were seeing authentication problems through Apache (but not directly
on Starman)


Ad 1.
The database imported on the new system had permissions which prevented the
pre-migration checks from being run successfully. After fixing the import
to be owned by the 'lsmb_dbadmin' user, this problem was resolved. The
development team considers the options to provide built-in import
functionality in order make sure the correct commands (resulting in the
right ownership) are executed.


Ad 2.
One bug was simple: an unquoted constant was taken to be a column name.
Quoting the constant solved the problem.
The other bug was similarly simply solved: data couldn't be migrated due to
an integrity constraint; by migrating the data in two steps, the migration
could be completed. This bug however, shows a design problem in the
1.3/1.2/SQL Ledger->1.5 migration process. The team is now working out how
to best fix this design problem. For the time being, the fix as used for
your migration will be used as it will enable migrations at this point.

Ad 3.
The Apache reverse proxy configuration needed to be extended with
CookiePath and CookieDomain reverse proxy statements. When these were
solved, you were unable to see that they were, because by that time, you
were receiving authentication failures due to your session being expired.
We'll include the ProxyPassReverseCookiePath and *CookieDomain settings in
the example Apache setup in the release.


Kind regards,


Erik.
Post by Erik Huelsmann
Hi Bill,
Post by bill Ott
Hi, Erik. Apparently I am not migrating this properly. The version from
the SQl select command was 1.3.30.
I moved the database by doing "pg_dumpall -c > dumpdata" from the 1.3.30
system but using the pg_dumpall program from the 1.5.3 system. I then
issued "psql -f dumpdata postgres" on the 1.5.3 system. Then logging into
the 1.5.3 system with psql and executing a "\l" shows all of the
databases. BUT, the version field from default is 1.3.30
Ok. That explains at least some of it. Which instructions have you been
using for your migration? Can you provide some details as to how you
handled each of the steps in the instructions? Having that information will
help me understand where you're currently at with your migration.
Post by bill Ott
Very odd the every select I tried on the database works correctly even
though the version is the old version.
Right. You made an exact copy of your database. Which means that all
queries should work as they did under 1.3.
Post by bill Ott
How should I proceed? Can I just use SQl to modify the version field,
or would that just be making things worse?
Just changing the number through an SQL statement will not help to resolve
the situation: the new software won't know it's talking to an old database
version, leaving them in Babylon.
--
Bye,
Erik.
http://efficito.com -- Hosted accounting and ERP.
Robust and Flexible. No vendor lock-in.
--
Bye,

Erik.

http://efficito.com -- Hosted accounting and ERP.
Robust and Flexible. No vendor lock-in.
David G
2017-02-28 05:19:18 UTC
Permalink
Hi Bill,
There are a few things in your script I'm not happy are correct. Unfortunately I can't get to a machine and confirm the best changes for another 4 hours or so.
Once I'm back in the office I'll do that and responded with more info.
You may find it useful to join us in Te support channelhttps://riot.im/app/#/room/#ledgersmb There is normally someone there 24/7 or close to.I'm in Western Australia  (gmt+8) and normally around until after midnight local time as user dcg_mx Erik (ehuelsmann) is about 7 hours behind (gmt+1)
Regards David Godfrey 
Sent from my Samsung Galaxy Note 4 on the Telstra Mobile network

-------- Original message --------
From: bill Ott <***@theotts.org>
Date: 28/02/2017 12:49 (GMT+08:00)
To: ledger-smb-***@lists.sourceforge.net
Subject: Re: [Ledger-smb-users] Migrating from 1.3.30 to 1.5.3


Eric, I am migrating to new hardware. I use a virtual machine
running the new OS as a test bed for each of the programs I am
migrating. So, starting over again is a 10 minute job. Stop the
virtual machine, delete the virtual machine file, copy the saved
virtual machine file over and restart the virtual machine. I then
run this script (script7.sh) as root on the virtual machine.
Scripts1-6 are for other apps that I have already tested on a
virtual machine. When I get all of the scripts running, I'll
install a clean OS on the new hardware and run all of the scripts.
Points of clarification



"/home/wbostore/backup/wbointi7/stage/" is on the storage
server and contains the necessary data from the old server, as
well as, new required data for the new server. 


The soft references  are for convenience (ln -s
/var/lib/pgsql/9.5/data/ /var/lib/pgsql/data)
To work around getting the DB users from the 1.3.30 DB to work
in 1.5.3 i changed the "peer" to "trust" (local  
all             all                              trust)

Any other changes are accidental and may be my problem. Thanks for
looking into this.







_______________________________________________


#!/bin/bash





NAME="wvointi7"

OS="CentOS_7"

LOADALL=1







#

# set up SMB Ledger- Postgres 9.5 service and Pass key

#

if [ 1 -eq $LOADALL ] ; then



cat > /etc/yum.repos.d/pgdg-95-centos.repo <<EOF

[pgdg95]

name=PostgreSQL 9.5 \$releasever - \$basearch

baseurl=https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-\$releasever-\$basearch

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-95



[pgdg95-source]

name=PostgreSQL 9.5 \$releasever - \$basearch - Source

failovermethod=priority

baseurl=https://download.postgresql.org/pub/repos/yum/srpms/9.5/redhat/rhel-\$releasever-\$basearch

enabled=0

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-95

EOF



cat > /etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-95 <<EOF

-----BEGIN PGP PUBLIC KEY BLOCK-----

Version: GnuPG v1.4.7 (GNU/Linux)



mQGiBEeD8koRBACC1VBRsUwGr9gxFFRho9kZpdRUjBJoPhkeOTvp9LzkdAQMFngr

BFi6N0ov1kCX7LLwBmDG+JPR7N+XcH9YR1coSHpLVg+JNy2kFDd4zAyWxJafjZ3a

9zFg9Yx+0va1BJ2t4zVcmKS4aOfbgQ5KwIOWUujalQW5Y+Fw39Gn86qjbwCg5dIo

tkM0l19h2sx50D027pV5aPsD/2c9pfcFTbMhB0CcKS836GH1qY+NCAdUwPs646ee

Ex/k9Uy4qMwhl3HuCGGGa+N6Plyon7V0TzZuRGp/1742dE8IO+I/KLy2L1d1Fxrn

XOTBZd8qe6nBwh12OMcKrsPBVBxn+iSkaG3ULsgOtx+HHLfa1/p22L5+GzGdxizr

peBuA/90cCp+lYcEwdYaRoFVR501yDOTmmzBc1DrsyWP79QMEGzMqa393G0VnqXt

L4pGmunq66Agw2EhPcIt3pDYiCmEt/obdVtSJH6BtmSDB/zYhbE8u3vLP3jfFDa9

KXxgtYj0NvuUVoRmxSKm8jtfmj1L7zoKNz3jl+Ba3L0WxIv4+bRBUG9zdGdyZVNR

TCBSUE0gQnVpbGRpbmcgUHJvamVjdCA8cGdzcWxycG1zLWhhY2tlcnNAcGdmb3Vu

ZHJ5Lm9yZz6IYAQTEQIAIAUCR4PySgIbIwYLCQgHAwIEFQIIAwQWAgMBAh4BAheA

AAoJEB8W0uFELfD4jnkAoMqd6ZwwsgYHZ3hP9vt+DJt1uDW7AKDbRwP8ESKFhwdJ

8m91RPBeJW/tMLkCDQRHg/JKEAgA64+ZXgcERPYfZYo4p+yMTJAAa9aqnE3U4Ni6

ZMB57GPuEy8NfbNya+HiftO8hoozmJdcI6XFyRBCDUVCdZ8SE+PJdOx2FFqZVIu6

dKnr8ykhgLpNNEFDG3boK9UfLj/5lYQ3Y550Iym1QKOgyrJYeAp6sZ+Nx2PavsP3

nMFCSD67BqAbcLCVQN7a2dAUXfEbfXJjPHXTbo1/kxtzE+KCRTLdXEbSEe3nHO04

K/EgTBjeBUOxnciH5RylJ2oGy/v4xr9ed7R1jJtshsDKMdWApwoLlCBJ63jg/4T/

z/OtXmu4AvmWaJxaTl7fPf2GqSqqb6jLCrQAH7AIhXr9V0zPZwADBQgAlpptNQHl

u7euIdIujFwwcxyQGfee6BG+3zaNSEHMVQMuc6bxuvYmgM9r7aki/b0YMfjJBk8v

OJ3Eh1vDH/woJi2iJ13vQ21ot+1JP3fMd6NPR8/qEeDnmVXu7QAtlkmSKI9Rdnjz

FFSUJrQPHnKsH4V4uvAM+njwYD+VFiwlBPTKNeL8cdBb4tPN2cdVJzoAp57wkZAN

VA2tKxNsTJKBi8wukaLWX8+yPHiWCNWItvyB4WCEp/rZKG4A868NM5sZQMAabpLd

l4fTiGu68OYgK9qUPZvhEAL2C1jPDVHPkLm+ZsD+90Pe66w9vB00cxXuHLzm8Pad

GaCXCY8h3xi6VIhJBBgRAgAJBQJHg/JKAhsMAAoJEB8W0uFELfD4K4cAoJ4yug8y

1U0cZEiF5W25HDzMTtaDAKCaM1m3Cbd+AZ0NGWNg/VvIX9MsPA==

=au6K

-----END PGP PUBLIC KEY BLOCK-----

EOF



#

# get the necessary perl modules

#

yum -y remove perl-DBD-Pg

yum -y install perl-CGI-Emulate-PSGI perl-CGI-Simple
perl-Config-IniFiles

yum -y install perl-DBI perl-DateTime
perl-DateTime-Format-Strptime

yum -y install perl-Digest-MD5 perl-File-MimeInfo perl-JSON-XS
perl-starman

yum -y install perl-Locale-Maketext perl-App-cpanminus perl-YAML

yum -y install perl-Log-Log4perl  perl-MIME-Lite
perl-Math-BigInt-GMP

yum -y install perl-Moose perl-Number-Format perl-Plack
perl-Template-Toolkit

yum -y install perl-namespace-autoclean perl-MooseX-NonMoose
perl-XML-Simple



cpan install CPAN

cpan install App::Info

cpan install Locale::Maketext::Lexicon

cpan install MIME::Base64

cpan install CGI::Simple

cpan install DBD::Pg



#

# set up postgres

#

yum -y remove postgresql

rm /var/lib/pgsql/data -Rf

yum -y install postgresql95-server postgresql95-devel
postgresql95-libs

ln -s /var/lib/pgsql/9.5/data/ /var/lib/pgsql/data

/usr/pgsql-9.5/bin/postgresql95-setup initdb



export POSTGRES_HOME=/usr/pgsql-9.5



cat > /var/lib/pgsql/data/pg_hba.conf <<EOF

local   all             postgres                         peer

local   all             all                              trust

host    all             postgres         127.0.0.1/32     reject

host    all             postgres        ::1/128      reject

host    postgres,template0,template1   lsmb_dbadmin        
127.0.0.1/32     md5

host    postgres,template0,template1   lsmb_dbadmin        
::1/128      md5

host    postgres,template0,template1   all         
127.0.0.1/32     reject

host    postgres,template0,template1   all          ::1/128     
reject

host    all             all             127.0.0.1/32     md5

host    all             all             ::1/128          md5

EOF



systemctl restart postgresql-9.5.service

cd /var/lib/pgsql/data

su postgres <<EOF

psql -f /home/wbostore/backup/wbointi7/stage/psqldump postgres

EOF

systemctl restart postgresql-9.5.service



#

# Install ledgersmb

#

cd /opt

cp /home/wbostore/backup/wbointi7/stage/ledgersmb-1.5.3.tar.gz
/opt/

tar -xzf ledgersmb-1.5.3.tar.gz

rm -f *.gz



cd /opt/ledgersmb

cpanm --quiet --notest --with-feature=starman --installdeps .



ln -s /usr/local/bin/starman /usr/bin/starman



cp /opt/ledgersmb/conf/systemd/* /usr/lib/systemd/system/

cp /opt/ledgersmb/conf/ledgersmb.conf.default
/opt/ledgersmb/ledgersmb.conf

chown root:root /opt/ledgersmb -Rf

sed  -i 's/=WORKING_DIR/=\/opt\/ledgersmb/'
/usr/lib/systemd/system/starman-ledgersmb.service

sed  -i 's/=WORKING_DIR/=\/opt\/ledgersmb/'
/usr/lib/systemd/system/plack-fcgi-ledgersmb.service

useradd -d /non-existent -r -U -c "LedgerSMB/Starman service
system user" ledgersmb



systemctl enable plack-fcgi-ledgersmb.service

systemctl enable starman-ledgersmb.service



systemctl start starman-ledgersmb.service



fi













Regards,
Bill Ott

Home: 919-363-0031
Cell: 919-434-7589
Email: Mailto:***@theotts.org
Website: http://www.theotts.org
Profile: http://www.linkedin.com/in/wbott



On 02/27/2017 04:27 PM, Erik Huelsmann
wrote:



Hi Bill,




On Mon, Feb 27, 2017 at 8:27 PM,
bill Ott <***@theotts.org>
wrote:



Hi, Erik. Apparently I am not migrating this
properly. The version from the SQl select command
was  1.3.30.


I moved the database by doing "pg_dumpall -c >
dumpdata" from the 1.3.30 system but using the
pg_dumpall program from the  1.5.3 system.   I then 
issued "psql -f dumpdata postgres" on the 1.5.3
system.  Then logging into the 1.5.3 system with
psql  and executing a "\l" shows all of the
databases.  BUT, the version field from default is
1.3.30


Ok. That explains at least some of it. Which
instructions have you been using for your migration? Can
you provide some details as to how you handled each of
the steps in the instructions? Having that information
will help me understand where you're currently at with
your migration.




Very odd the every select I tried on the database
works correctly even though the version is the old
version.


Right. You made an exact copy of your database. Which
means that all queries should work as they did under
1.3.




How should I proceed?  Can I just  use SQl to
modify the version field, or would that just be
making things worse?




Just changing the number through an SQL statement
will not help to resolve the situation: the new software
won't know it's talking to an old database version,
leaving them in Babylon.


 






--


Bye,



Erik.



http://efficito.com --
Hosted accounting and ERP.
Robust and Flexible. No vendor lock-in.










------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot





_______________________________________________
Ledger-smb-users mailing list
Ledger-smb-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users
Loading...