This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
URL_DB_SOURCE = jdbc:mysql://10.2.24.167:3306/alfresco | |
USER_DB_SOURCE = alfresco | |
PASSWORD_DB_SOURCE = alfresco | |
URL_DB_DESTINATION = jdbc:postgresql://10.2.31.23:5432/ECMPRD01_alfresco1 | |
USER_DB_DESTINATION = alfresco | |
PASSWORD_DB_DESTINATION = alfresco | |
ONLY_NOT_EMPTY = false | |
TRANSFER.THREADS = 8 | |
MYSQL.NORMALIZE.BIT_BOOLEAN = true | |
CONSTRAIN.KEEP_NAMES = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE FUNCTION "reset_sequence" (tablename text, columnname text, sequence_name text) RETURNS "pg_catalog"."void" AS | |
$body$ | |
DECLARE | |
BEGIN | |
EXECUTE 'SELECT setval( ''' || sequence_name || ''', ' || '(SELECT MAX(' || columnname || ') FROM ' || tablename ')'; | |
exception when others then | |
raise notice 'Wrong column name, ignore'; | |
END; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Marco Garcês - mgarces at sysadmin dot pt | |
# 2014 | |
# These are the steps I took to migrate an Alfresco 3.4d community, running on top of MariaDB 5.5.35-1 | |
# to Alfresco 4.0d on PostgreSQL 9.3.4 [CentOS release 6.5 (Final)] | |
# | |
# Prerequisites: | |
# You need the original MySQL Database (I used a cloned virtual machine of my original server), 2 empty Postgres databases, with # name alfresco and alfresco40, with owner alfresco, password alfresco. | |
# I have also used the soon-to-be opensource tool, DBTransfer (https://github.com/mgarces/dbtransfer) to move the data from | |
# MySQL to PostgreSQL. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Prerequisite | |
One instance of Alfresco on mysql, one postgresl of exactly the same version (schema version). | |
Step 1. Dump database | |
mysqldump --port 3306 -u alfresco --password=alfresco -h 127.0.0.1 --databases alfresco --skip-comments --skip-extended-insert --no-create-db --hex-blob --default-character-set=utf8 --skip-triggers --compact --no-create-info --skip-quote-names --compatible=postgresql > mydump.sql | |
Step 2. Dump local Postgres schema | |
You can install a clean version of Alfresco to use as for schema dump | |
(need to insert command for dump here) |
NewerOlder