WordPress.org

Ready to get started?Download WordPress

Forums

Online Backup for WordPress
SQL Error and Primary Key (10 posts)

  1. jnze
    Member
    Posted 1 year ago #

    Hi!

    First I want to say this seems like a really nice backup plugin, best I've seen so far. Only problem is I can't get it to work.

    I get two problems, but first I want to say the table prefix ass_ looks weird in english, but it's for a boat club that really reads ├ůSS. Swedish looks weird in english, lol.

    Anyway, here is the first problem:

    A database operation failed.
    Please try reinstalling the plugin - in most cases this will repair the database.
    Please contact support if the issue persists, providing the complete event log for the activity. Diagnostic information follows:

    Failed at: 903(/******I deleted this*******/www/wp-content/plugins/wponlinebackup/include/files.php)
    WPDB error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND name = 'cgi-bin'' at line 1. Last query: SELECT scan_id FROM ass_wponlinebackup_scan_log WHERE parent_id = AND name = 'cgi-bin'

    The second is:

    Table 'ass_signups' has no PRIMARY or UNIQUE key! Backup of this table may be inconsistent; some rows could get missed. See FAQ for more information.

    Thank you for any help

    http://wordpress.org/extend/plugins/wponlinebackup/

  2. Online Backup
    Member
    Plugin Author

    Posted 1 year ago #

    Hi jnze,

    Are you using MySQL? Are you using any database plugins with WordPress?
    This is a new issue I've not seen before. What version of WordPress are you running?

    Does the error happen straight away or after scanning a few files.

    Sorry for the burst of questions - just trying to cover what I think may be the main places to investigate.

    Regards,

    Jason.

  3. Online Backup
    Member
    Plugin Author

    Posted 1 year ago #

    For the second problem, this is normal and can usually be ignored. It just means a plugin that isn't designed very well.

    You'll find the FAQ here:
    https://wordpress.backup-technology.com/FAQ

    Here is the bit for the problem you posted - it's quite a thorough explanation but I think everything is getting a refresh soon to make it all simpler and minimalist.

    Because our plugin takes data from your tables section by section instead of all at once to prevent any problems with web servers that don't like long running scripts, we need a method of distinguishing between what we have backed up already, and what we haven't, in case the database contents change during the backup. We could lock the tables and prevent changes but this would not be a feasible approach for a constantly changing blog. So to get around the problem of changing data, we use the table PRIMARY key, which is a unique value in every row and allows us to remember exactly which rows we have already backed up.

    However, some tables are poorly designed and do not have any PRIMARY key, so we do not have a unique value to distinguish between rows and we are forced to request a range of rows. What this means is that if a new row of information is inserted into the table at the beginning, and we are in the middle of a backup, when we ask for the range of rows "50-100", we would instead receive what was previously rows "49-99" (the inserted row will make row 1 become row 2, and so on.) This will cause the backup to contain the same row twice. In a potentially worse scenario, if the first row is deleted while we are performing a backup, when we request rows "50-100" we would receive rows "51-101"! We would essentially miss row 50, and have no way of knowing or preventing this.

    Because of this problem, we have made the plugin report this as a warning so that you are aware that should the table be consistently changing, the backup may not be completely consistent, and some rows may have been duplicated or lost.

  4. jnze
    Member
    Posted 1 year ago #

    Are you using MySQL?

    Yes it's my SQL

    Are you using any database plugins with WordPress?

    Not sure which of these counts as DB plugins but here's my list:
    - User Access Manager
    - User Role Editor
    - WP-Password Generator
    - Sidebar Login
    - Allow Multiple Accounts

    This is a new issue I've not seen before. What version of WordPress are you running?

    3.2.1 (swedish) want to backup before I update :)

    Does the error happen straight away or after scanning a few files.

    Sorry for the burst of questions - just trying to cover what I think may be the main places to investigate.

    I'm just happy for the super quick reply! :) I understand and will ignore the other problem, thanks for the info!

    /jens

  5. Online Backup
    Member
    Plugin Author

    Posted 1 year ago #

    Hi jnze,

    Do you know the version of PHP your web host has? You might need to login the control panel to take a look.

    Please could you email it to support "at" backup-technology "dot" co "dot" uk
    I'll watch the email. Post here when you've sent. I'll get over to you a special version of the plugin you can try which will hopefully shed a bit more light on the problem.

    Regards,

    Jason.

  6. jnze
    Member
    Posted 1 year ago #

    Hi Jason,
    E-mail away!

    /jens

  7. Online Backup
    Member
    Plugin Author

    Posted 1 year ago #

    Hi jnze,

    Can you run another manual backup and let me know if you still end up with a 0 bytes file?

    Also, are you running a manual download backup with encryption, or without encryption? (As in, does it give you a .enc file or a .zip file.)

    Regards,

    Jason

  8. Online Backup
    Member
    Plugin Author

    Posted 1 year ago #

    Sorry jnze, I mixed up issues :-)
    Ignore my last entry!

  9. Online Backup
    Member
    Plugin Author

    Posted 1 year ago #

    Hi jnze,

    I haven't found the email you sent I'm afraid. I've still produced a debug version for you to try. If you can email me again I can email it back to you.
    support@backup-technology.co.uk

    I'll give you instructions in the email.

    Thanks,

    Jason

  10. Online Backup
    Member
    Plugin Author

    Posted 1 year ago #

    Hi jnze,

    I've actually uploaded development version to WordPress with the fix.
    http://wordpress.org/extend/plugins/wponlinebackup/download/
    If you go to that page and download Development Version you'll get a zip file.

    You'll have to deactivate and delete the existing plugin you have installed, and then click Add New on plugins and then Upload, and chose the zip file downloaded.

    You'll need to configure all the settings again etc. but it should fix the database error you were getting.

    Regards,

    Jason.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic