dschwen / g2piwigo

Migrate your Gallery2 database to Piwigo
12 stars 2 forks source link

Gallery2(PostgreSQL) => Piwigo(MySQL) #2

Open Wikinaut opened 7 years ago

Wikinaut commented 7 years ago

Hello Daniel,

is there also a script, or do you have instructions, to convert a Gallery2 (PostgreSQL) to Piwigo (MySQL) ?

Here the basic data of my old installation:

Gallery-Version = 2.3.2 Kern 1.3.0.2
API = Core 7.54, Modul 3.9, Motiv 2.6, Eingebettet 1.5
PHP-Version = 5.6.21 apache2handler
Webserver = Apache/2.4.10 (Debian)
Datenbank = postgres7 9.4.6 3 9.4.6 UTF8 UTF8 off galleryadm ISO, DMY postgres , lock.system=flock
Werkzeuge = ArchiveUpload, ImageMagick, NetPBM, Ffmpeg, Gd, Exif, Thumbnail
Beschleunigung = none/0, full/900
Betriebssystem = Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) x86_64
Standard-Motiv = matrix
gettext = Aktiviert
Sprache = de_DE
Zeilen in der GalleryAccessMap Tabelle = 1180
Zeilen in der GalleryAccessSubscriberMap Tabelle = 2583
Zeilen in der GalleryUser Tabelle = 16
Zeilen in der GalleryItem Tabelle = 2576
Zeilen in der GalleryAlbumItem Tabelle = 119
Zeilen in der GalleryCacheMap Tabelle = 47 
dschwen commented 7 years ago

Hmmm, I guess you'd have to customize the script and replace one mysql connection with a postrgres connection.

dschwen commented 7 years ago

The two connections are completely separate from each other, so changing one to Postgres should be straightforward.

Wikinaut commented 7 years ago

Thanks for your swift answer.

Wikinaut commented 6 years ago

In your instructions, are you really sure here * first copy the contents of g2data/albums to piwigo/galleries ?

In my new Piwigo installation (2.9.2) I have /piwigo/upload (with a single test image I just uploaded) and in /piwigo/galleries I currently see only a short index.php script.

dschwen commented 6 years ago

Good question. I have to admit that I haven't tested this with more recent piwigo versions. It is possible that changes in piwigo occurred since I wrote the converter.

Wikinaut commented 6 years ago

@dschwen Okay. Please can you tell me, into what directory the gallery2-images should be moved ? The directory, where other images live?

Wikinaut commented 6 years ago

@dschwen In my version I see

/var/www/html/Piwigo/upload$ dir
total 16
4 drwxrwxrwx  4 www-data www-data 4096 Nov 27 11:31 .
4 drwxr-xr-x 16 www-data www-data 4096 Nov 27 11:31 ..
4 drwxrwxrwx  3 www-data www-data 4096 Nov 27 11:31 2017
4 drwxrwxrwx  2 www-data www-data 4096 Nov 27 11:31 buffer
Wikinaut commented 6 years ago

One had to copy gallery2/albums to piwigo/galleries , so your explanation is still correct for the present version!

First observation (not your problem, of course):

piwigo is a very bitchy program, for example, piwigo-synchronize ignores images (image files) with spaces in the filenames.

rbroberts commented 6 years ago

Okay, I'll ask the obvious question here...were you actually able to do this migration? I'm trying to figure out what I'm going to need to do for this same migration.

Wikinaut commented 6 years ago

@rbroberts Basically yes, I was able to convert from PostgreSQL to MySQL. I did not care about the comments, which as far as I remember, were lost, because I was too lazy to convert the three or four or ten comments we had on a couple of thousands of images.

rbroberts commented 6 years ago

Thanks for that follow-up. I'll give this a shot.