We’re running the MFG version 4.11.1.
The pg_dumpall command is very useful for backing up & restoring the complete database; however, I’m running into some odd back-end errors when I use this method. I’m not sure if it has anything to do with the PostgreSQL version difference, but according to the documentation I’ve read, it shouldn’t.
To backup the PostgreSQL 9.3 data, I use:
/opt/local/lib/postgresql93/bin/pg_dumpall -c -U postgres -f backupfile.sql
The “-c” option causes pg_dumpall to include all the necessary “cleanup” commands to drop & create everything, so you can import the file on top of an existing xTuple install. This is convenient for migrations, maintaining a “hot spare” server, etc.
To restore into PostgreSQL 9.6, I use:
/opt/local/lib/postgresql96/bin/psql -U postgres -f backupfile.sql
When I open xTuple on the restored system, and view the database log, I see the errors below.
Fri Jan 19 13:49:56 2018 Debug: "Manufacturing"
Fri Jan 19 13:49:58 2018 Warning: QLayout: Attempting to add QLayout "" to GUIClient "", which already has a layout
Fri Jan 19 13:50:01 2018 Debug:
Starting Dashboards WebSocket Server...
Fri Jan 19 13:50:01 2018 Debug:
xTuple Dashboards ws.Server listening on ws://127.0.0.1::3030
Fri Jan 19 13:50:02 2018 Debug:
Starting Dashboards HTTP Server...
Fri Jan 19 13:50:02 2018 Debug:
xTuple Dashboards http.Server listening on http://127.0.0.1::3000
Fri Jan 19 13:50:04 2018 ERROR: function xtdash.performaction(unknown, unknown) does not exist
LINE 1: SELECT xtdash.performAction('LOAD_DASHBOARD' , '{"dashboardT...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
(42883) QPSQL: Unable to create query
SELECT xtdash.performAction('LOAD_DASHBOARD' , '{"dashboardType":"user","objKey":"jon"}' ) AS response
Fri Jan 19 13:50:04 2018 Warning:
Warning: a promise was rejected with a non-error: [object String]
Fri Jan 19 13:50:04 2018 ERROR: function xtdash.performaction(unknown, unknown) does not exist
LINE 1: SELECT xtdash.performAction('LOAD_DATA_SOURCES' , NULL ) AS ...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
(42883) QPSQL: Unable to create query
SELECT xtdash.performAction('LOAD_DATA_SOURCES' , NULL ) AS response
Fri Jan 19 13:50:04 2018 Warning:
Warning: a promise was rejected with a non-error: [object String]
Fri Jan 19 13:50:04 2018 Debug:
Dashboard API Query ERROR: Query failed: ERROR: function xtdash.performaction(unknown, unknown) does not exist
LINE 1: SELECT xtdash.performAction('LOAD_DASHBOARD' , '{"dashboardT...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
(42883) QPSQL: Unable to create query
Fri Jan 19 13:50:04 2018 Warning:
Warning: a promise was rejected with a non-error: [object Object]
Fri Jan 19 13:50:04 2018 Debug:
Dashboard API Query ERROR: Query failed: ERROR: function xtdash.performaction(unknown, unknown) does not exist
LINE 1: SELECT xtdash.performAction('LOAD_DATA_SOURCES' , NULL ) AS ...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
(42883) QPSQL: Unable to create query
Fri Jan 19 13:50:04 2018 Warning:
Warning: a promise was rejected with a non-error: [object Object]
Fri Jan 19 13:50:04 2018 Critical:
Dashboards API ERROR: [object Object]
Stacktrace:
<native>('Dashboards API ERROR:', [object Object]) at -1
handleActionReject(reason = [object Object]) at ws-server:81
tryCatcher([object Object]) at bluebird:5255
<anonymous>(handler = function handleActionReject(reason) {
console.error('Dashboards API ERROR:', reason);
// Changed performAction error propagation. Remove this old version
// if the new one below works well.
//socket.send(JSON.stringify({error: {message: reason}}));
socket.send(JSON.stringify(reason));
}, receiver = undefined, value = [object Object], promise = [object Promise]) at bluebird:3277
<anonymous>(promise = [object Promise], handler = function handleActionReject(reason) {
console.error('Dashboards API ERROR:', reason);
// Changed performAction error propagation. Remove this old version
// if the new one below works well.
//socket.send(JSON.stringify({error: {message: reason}}));
socket.send(JSON.stringify(reason));
}, receiver = undefined, value = [object Object]) at bluebird:3334
<anonymous>(handler = function handleActionReject(reason) {
console.error('Dashboards API ERROR:', reason);
// Changed performAction error propagation. Remove this old version
// if the new one below works well.
//socket.send(JSON.stringify({error: {message: reason}}));
socket.send(JSON.stringify(reason));
}, value = [object Object], bitField = 16777217) at bluebird:3379
<anonymous>() at bluebird:3454
<anonymous>(queue = [object Object]) at bluebird:187
<anonymous>() at bluebird:197
<anonymous>() at bluebird:71
<anonymous>() at timers:53
<global>() at -1
Fri Jan 19 13:50:04 2018 Critical:
Dashboards API ERROR: [object Object]
Stacktrace:
<native>('Dashboards API ERROR:', [object Object]) at -1
handleActionReject(reason = [object Object]) at ws-server:81
tryCatcher([object Object]) at bluebird:5255
<anonymous>(handler = function handleActionReject(reason) {
console.error('Dashboards API ERROR:', reason);
// Changed performAction error propagation. Remove this old version
// if the new one below works well.
//socket.send(JSON.stringify({error: {message: reason}}));
socket.send(JSON.stringify(reason));
}, receiver = undefined, value = [object Object], promise = [object Promise]) at bluebird:3277
<anonymous>(promise = [object Promise], handler = function handleActionReject(reason) {
console.error('Dashboards API ERROR:', reason);
// Changed performAction error propagation. Remove this old version
// if the new one below works well.
//socket.send(JSON.stringify({error: {message: reason}}));
socket.send(JSON.stringify(reason));
}, receiver = undefined, value = [object Object]) at bluebird:3334
<anonymous>(handler = function handleActionReject(reason) {
console.error('Dashboards API ERROR:', reason);
// Changed performAction error propagation. Remove this old version
// if the new one below works well.
//socket.send(JSON.stringify({error: {message: reason}}));
socket.send(JSON.stringify(reason));
}, value = [object Object], bitField = 16777217) at bluebird:3379
<anonymous>() at bluebird:3454
<anonymous>(queue = [object Object]) at bluebird:187
<anonymous>() at bluebird:197
<anonymous>() at bluebird:71
<anonymous>() at timers:53
<global>() at -1
Fri Jan 19 13:50:12 2018 Debug: Looking for scripts ("QObject", "QWidget", "XWidget", "errorLog")
I’ve tried running Gil’s script (Upgrade 4.4.0->4.9.2, ERROR: function "xt.js_init" does not exist), but that throws an error (plv8 is already installed):
WARNING: failed to find js function javascript function is not found for “xt.js_init”.
Is there some sort of initialization SQL script that I need to run in order to make this work properly?