data disappearing "over night"

fneumeier Member
edited December 2018 in General support

Hi,

I'm observing very weird behavior, having no idea why this is happening (and how):

For some (actually most) albums the information in literally all database fields are lost (e.g. album title, description, thumbnail) - they're disappearing "over night". After entering the information and saving, they're actually there and stays there for hours.

But then when I looked at it the next morning, all the fields are empty (database field content: NULL) and the album title has been reset to the folder name of the album (i.e. something like "my-abum-title").

Besides that, Zenpage also obviously "forgets" the manual sort order for the top-level album.

It only happens for top-level albums, not for sub-albums. And it doesn't happen to all albums, just kind of randomly to about 80% of the albums.

Any idea what could trigger this deletion of database field contents?

Thanks and kind regards,
Franz

Comments

  • just found in the security logs that cron_runner obviously is triggering

    /zp-core/utilities/backup_restore.php

    by literally every visitor to the website. Is backup_restore part of the auto_backup plugin? So do I solve the issue by deactivating the plugin?

  • another obversation: obviously not effected are albums that have been created after the observed backup_restore.php activity mentioned in the earlier comment has started. So this Cron activity seams to restore the status from some months ago, but just for the top level albums that have been existing before a specific day. Pretty weird, but maybe that helps identify the issue?

  • acrylian Administrator, Developer

    backup_restore is not directly part of the the auto_backup plugin. It is a plain utility to manually create database backupd and restore them.

    The auto_backup plugin as suggested by its name handles the automatic db backup. So disabling would stop that. It is not a real server side cron but is triggered by visits to the site. How often is set on the utility option but by any means it does not trigger on every visit/visitor.

    The auto_backup does not modify or change the database. The weird behaviour you are observing must have some other cause. It is neither a known bug nor do we encounter it ourselves (there has been no work on this area between 1.5 to 1.5.1). Our own site runs with Zenphoto (except the forum) and we also use the auto_backup plugin and all data is were it should be.

    Please review all logs if there is anything that may be involved. Perhaps something else happens on your server, perhaps some file system issues. If for some weird reason the albums are unreadable temporarily Zenphoto would remove them from the db which would clear the data. It would then re-add them when is can read them again as new being file system based. But this would be really weird behavioir…

  • Thanks, that guided me in the right direction. It seems indeed that the access to these folders are being blocked - by an external backup service ... I'm now investigating how this can happen, but at least I do know now where the issue is coming from. Weird.

  • Finally, may I suggest to think about changing the behaviour of Zenphoto when a folder is inaccessible?

    Either ask the Admin whether it's okay to delete the information about not existing or not accessible folders; or auto-save a backup file with the database information before erasing them so it will be possible to recover lost information in such a case.

    It probably happens only rarely, but in my case it did cost me two full days of work that were lost. Guess there might be other situations where a folder is not accessible temporarily which then results in total loss of valuable content in the database ...

    Thanks for considering (and thanks for the great software anyway!),
    Franz

  • acrylian Administrator, Developer

    or auto-save a backup file with the database information before erasing them so it will be possible to recover lost information in such a case.

    As long as you have frequent db backups (our tool or another db backup tool) and the albums are still present on the file system you can actually restore like you mentioned.

    Changing the current behaviour may cause other side effects like broken images and user confusion. It should not be taken or changed lightly.

    Your trouble seems indeed quite specific and you mentioned another tool may have been the cause. Did you find out why the folders are inaccessible at all? If it was that other tool why the heck does it do that?

  • good point, I understand why you don't want to touch the system.

    I'm in contact with the other service to find out what exactly is happening there.

    As of frequent backups: I thought I have them - but as the auto_backup plugin did some weird things as well, I only have backups from after the issue appeared. The plugin ran a backup every few minutes (and the settings were to only keep the last 30 backup files). I'll look into a backup solution independently of Zenphoto to make sure different issues will not build up on each other ;-)

    Again, thanks very much for your support. I'll let you know if I find out more when it's relevant for Zenphoto.

  • acrylian Administrator, Developer

    The auto_backup plugin should not do backups that often. The inteval is set in days on it's option actually so I have no idea how this can happen. Was/iis it perhaps not set at all and somehow causing confusion?

    For database backup you can also use another tool. If your server supports mysqldump for example.

  • I found that the permission settings on the server for the albums didn't match your recommendations (though everything worked smoothly for years with these settings ;-)
    After changing the permissions, the issue seems to have disappeared. It's still strange what happened, but at least the issues seems to be solved by now. I'll investigate further what concerns the auto_backup ...

  • acrylian Administrator, Developer

    Thanks, that could indeed be. These things sometimes can happen if the host does updates. Or silently moves you to another server for internal re-organisation which you normally don't notice. But that's just a wild guess without knowing it of course.

Sign In or Register to comment.