Question about ... migration

wibbi Member
edited March 2018 in General support

Hello,
i have a little bit questions to a migration.
The nirvana.py Python Script don't work (for me). I will make it self, with PHP.

I am now looking for different ways of migration and want to inform myself about this.

1.) The first option would be to first scan all images from ZenPhoto and then to expand the ZenPhoto database with the titles, description, tags, etc, using the data from the Gallery3 database.

Is it OK if ~15000 image files are saved in the folder /albums and then the admin page "Albums" is called up, or is this overloading the system? Respectively, where is the point where the images are scanned / recognized?
Respectively, are really all images in folders and subfolders scanned once with the call to the admin page "Albums"?

2.) The second option would be to fill the ZenPhoto database untouched with the data from the Gallery3 database. Since I do not know which tables and columns in the ZenPhoto database necessarily have to be filled out.

Other problems will be to show in ZenPhoto the parent album thumbs which are manually selected in Gallery3.

If you have information and ideas I am very happy about it.

Comments

  • acrylian Administrator, Developer
    edited March 2018

    The gallery part of Zenphoto (btw, it is Zenphoto, not ZenPhoto! ;-)) scans on discovery. There is a "Database refresh" button on the overview page that really scans the complete albums folder and matches the database with it. This is also to be used if anything gets out of sync. Which it does if you for example delete via ftp in a subfolder that never gets visits so it never gets updated.

    Again, if anything is in the database that has no equivalent on the file system it will be considered gone. So you have to have your images/albums present when you edit the database as it otherwise will be for nothing.

    Generally this applies to migrations, too:
    http://www.zenphoto.org/news/moving-and-changing-existing-installations/

  • wibbi Member
    edited March 2018

    OK, thanks.

    Scanning of folders and their images and subfolders:
    All subfolders in a folder (without images in there) will be scanned when call the /zp-core/admin-edit.php page.

    Scanning of subfolders and their images and subfolders:
    All images and subfolders in a subfolder will be scanned when call the subfolder in the /zp-core/admin-edit.php page.
    example subfolder call: /zp-core/admin-edit.php?page=edit&album=subalbum

    So, it is always scanned only one level down.

    First Question: Does a server tolerate 15000 image files on database refresh? (no overload or timeout?)

  • wibbi Member

    OK, ~15000 images with once scanning over the album Edit Page is no problem. But you should have already/befor set the dropdown "Show X album levels" to the existing folder depth.

    With me it stopped in the middle once. After reloading (F5) the rest was loaded.

    Maybe a button ("load albums and images") would be better than the pure pageview. So you could make the "Show X album levels" setting beforehand.

  • acrylian Administrator, Developer

    This was added because it did kill installations with lots of albums and subalbums in the past. That's why it is an option.

    Again the principle of Zenphoto is to discover on request. Otherwise use the "database refresh" button to scan everything.

  • wibbi Member

    "Refresh the Database"-Button in the "Overview" Page?

    In addition: I had deactivated "Show album thumb".

  • acrylian Administrator, Developer

    Yes, that button. It syncs the database with what is on the file system on request. And the whole albums folder.

    Yes, album thumb disabling is good but a lot of nested albums can cause a lag as well as images and subalbums need to be counted. Therefore you can choose how much to display.

  • wibbi Member

    New question: I notice that the Gallery3 content (title, desc) is stored without HTML <br> line break, but with \n (or similar). How is that in Zenphoto? Can I copy the database entries 1:1, or do I have to replace something?

  • wibbi Member

    Currently problems with migration with apostrophes in title and description, like "cat's toys".

  • acrylian Administrator, Developer

    A little more info like what the actual issue (= error message) is would help. Probably an encoding issue.

  • wibbi Member

    Hey acrylian, it was just an interim message.

    I have already migrated the albums and photos.
    I have published the migration scripts to Github.

    I migrated albums and images separately. Also to keep an overview, if there are mistakes.

    There is still a script missing for the tags. For this it needs a SQL Tripple Inner Join.

    Read the README.
    https://github.com/mebels/men-to-zen-migration

  • acrylian Administrator, Developer

    All right, no problem, sounded like you would need help. Let me know once this guide is complete and we gladly link to it from our user guide somewhere.

  • wibbi Member
    edited March 2018

    For my purposes, I only need a simple SQL inner join to migrate the tags, but let me see if I can do it with a tripple.

  • wibbi Member
    edited March 2018

    There is a problem. The image migration script has an error. In Gallery3, two images in the same album/folder can have the same "weight" (sort order number). Difficult to solve.

    Apart from that, a first test works with the triple inner join for the tags.

  • wibbi Member
    edited March 2018

    The sort order bug is fixed for albums and images and the scripts extremely accelerated. What were minutes ago are now seconds.

  • wibbi Member
    edited March 2018

    The script for migrating tags for the images is ready.
    Coming soon will be the script for migrating the tags for the albums. If I recall correctly, my albums in Gallery3 have no tags. Creating the script becomes a blind flight.

  • wibbi Member

    There were a few tags on the albums.

Sign In or Register to comment.