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) |
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
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
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
for n in $(for i in {3..10000} ; do out=$(( $i % 2 )); if [ $out -eq 1 ]; then echo $i ; fi ; done) ; do F=($(factor $n)) ; if [ -z "${F[2]}" ]; then echo $n ; fi ; done |
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
The last packet successfully received from the server was 7,419,456 milliseconds ago. The last packet sent successfully to the server was 9,448,563 milliseconds ago. | |
at sun.reflect.GeneratedConstructorAccessor2.newInstance(Unknown Source) | |
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) | |
at java.lang.reflect.Constructor.newInstance(Constructor.java:526) | |
at com.mysql.jdbc.Util.handleNewInstance(Util.java:409) | |
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1127) | |
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3715) | |
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3604) | |
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4155) | |
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:926) |
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
[Tue Aug 12 12:29:11.888327 2014] [core:error] [pid 6120] [client 10.5.5.222:52943] End of script output before headers: s3gw.fcgi | |
[Tue Aug 12 12:29:17.037566 2014] [fcgid:warn] [pid 6121] (104)Connection reset by peer: [client 10.5.5.222:52960] mod_fcgid: error reading data from FastCGI server | |
[Tue Aug 12 12:29:17.037731 2014] [core:error] [pid 6121] [client 10.5.5.222:52960] End of script output before headers: s3gw.fcgi |
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
server { | |
listen 80; | |
server_name *.rados.test rados.test; | |
client_max_body_size 10g; | |
# This is the important option that tengine has, but nginx does not | |
fastcgi_request_buffering off; | |
location / { |
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
source 'https://rubygems.org' | |
require 'json' | |
require 'open-uri' | |
require 'kramdown' | |
versions = JSON.parse(open('https://pages.github.com/versions.json').read) | |
gem 'font-awesome-sass' | |
gem 'kramdown' | |
gem 'github-pages', versions['github-pages'] |
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
# I had a bit of trouble getting my unifi controller (hosted offsite) to use a proxy/letsencrypt. So here are the fruits of my labor. | |
# The unifi default port is 8443 running on localhost. | |
# License: CC0 (Public Domain) | |
server { | |
# SSL configuration | |
# | |
listen 443 ssl default_server; | |
listen [::]:443 ssl default_server; |
OlderNewer