• Resolved fpwordpress

    (@flaviowordpress)


    Hello, database backup files display truncated code at the end of the file. This is an example of the last line visible:

    INSERT INTO wp_yoast_seo_meta VALUES (“4769″,”0″,””);

    Afteer this line 5 empty lines appear, and then no other code is visible.

    Any hint about that please? Thank you.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Support chandelierrr

    (@shanedelierrr)

    Hi @flaviowordpress, thanks for reaching out!

    I checked my DB backup file while also having the Yoast plugin active on my test site, and I got a similar result: https://share.zight.com/OAuNwYkz. I believe those empty lines are intentional and expected.

    For now, I would suggest that you try to restore the DB backup file on a test site and then check if there are issues with the plugins/themes or missing settings/files.

    Let me know how that goes!

    Thread Starter fpwordpress

    (@flaviowordpress)

    Hello, thank you for your answer.

    Before arranging a test site as you suggest, I have found out another detail which might be relevant as well: my database contains some extra tables, such as “_my_extra_table”, which I can see in PhpMyAdmin, after the “wp_yoast_seo_meta” table.

    These tables are not included in the backup.

    If I check the setting of your plugin, in the area where I see all tables to include (and exclude) in the backup, my extra tables are not displayed, and therefore not included in the backup.

    Any hint about that, please? Thank you.

    Hi @flaviowordpress,

    I think this is because the Solid Security Database Backups feature ignores tables whose names do not start with the WordPress database table prefix.

    +++ To prevent any confusion, I’m not SolidWP +++

    Thread Starter fpwordpress

    (@flaviowordpress)

    Hello @nlpro, that might be a reason. Anyway, other database backup plugins I have tested, do recognize and backup custom DB tables. The thing is, I would rather avoid adding an extra plugin for DB backup, as the feature is included in the Solid Security package.

    Hi @flaviowordpress,

    I hear you, but the Solid Security plugin is not a “database backup plugin”.

    IMHO a database backup is too important to rely on the simple/limited Database Backups feature of the Solid Security plugin. You are far better off with a true database backup plugin.

    @shanedelierrr

    Is there still a seamless integration between the Solid Security and Solid Backups plugins as there was with the iThemes Security and BackupBuddy plugins in the past?

    • This reply was modified 10 months, 3 weeks ago by nlpro.
    • This reply was modified 10 months, 3 weeks ago by nlpro.

    @shanedelierrr,

    It seems the seamless integration I mentioned in my previous post has long seized to exist. Something I was unaware of.

    But according to the 8.0.0 changelog:

    Tweak: The Database Backups module is no longer available if you have BackupBuddy installed. If this behavior isn’t desired, enable the “ITSEC_ENABLE_BACKUPS” constant.

    (Where Solid Backups is the new name for BackupBuddy).

    Actual testing showed me this is still valid for the Solid Security 9.x.x code branch.

    If you decide to use a different backup plugin solution (different than Solid Backups) add the 2 lines below to the wp-config.php file to make the Database Backups feature disappear likewise:

    define( 'ITSEC_ENABLE_BACKUPS', false );
    define( 'BACKUPBUDDY_PLUGIN_FILE', 'astring' );
    Plugin Support chandelierrr

    (@shanedelierrr)

    Hi @flaviowordpress, I understand your perspective on avoiding using another backup plugin, although I agree with @nlpro on this matter.

    The Solid Security plugin is geared towards website security. While it excels in that aspect, its DB Backup feature is limited and doesn’t have a way to manually add the extra tables that start with “_”. If you want to include the extra tables, relying on a dedicated and robust backup plugin is wise. Also, if you can confirm that those extra tables are for storing temporary data (that will be deleted once a process is completed), then I wouldn’t worry much about them and proceed with testing the DB backup on a test environment to see if there are issues with the plugins/theme functionalities.

    Hope this helps, and please let us know if you have other questions.

    Hi @nlpro, you’re correct. If a site uses the Solid Backups (BackupBuddy) together with Solid Security, SolSec’s Database Backup feature will be disabled.

    Also, thank you for sharing your testing details! We should definitely add this to our documentation. I’ll forward this to our team so they can update it.

    If you have any recommendations, feel free to share them here.

    Thread Starter fpwordpress

    (@flaviowordpress)

    Hi @shanedelierrr, thank you for your answer.

    I will then rely on an additional DB backup plugin.

    Nevertheless, I would like to underline that extra tables beyond “wp_ ” are not an extraordinary event and many sites rely on them for additional functions, and therefore they become an integral part of the DB. They are not a fancy function arisen from the “creativity” of developers, and for this reason one could expect them to be included in your backups, given the high level of the plugin.

    Maybe one workaround is changing the table name from “_my_extra_table” to “wp_my_extra_table”. Would the plugin backup the table in that case? Thank you.

    Plugin Support chandelierrr

    (@shanedelierrr)

    Hi @flaviowordpress, you’re always welcome, and thank you for sharing your thoughts!

    While I’ve yet to replicate having tables that start with “_” on my test sites, you could try that workaround. However, I believe you also need to find the references of those tables in the codebase and queries and then update them to reflect the new table name. Once done, try to rerun the DB backup tool to see if the tables are displayed on the list. If they are, create a DB backup, restore it on a test site, and check the restored version for any issues. Please make sure to try this workaround on a staging site first.

    Hope this helps, and let us know how it goes.

    Thread Starter fpwordpress

    (@flaviowordpress)

    Hello @shanedelierrr, thank you for your answer.

    Just another basic question: as I have pointed out in my first post, when the last line of code is rendered in the backup file, all you see is just some blank lines.

    I have found out that other DB backup plugins end the code with some comment lines, to indicate that the backup was successfully completed.

    I have no intention to compare your solutions with other plugins, but wonder if these 5 blank lines actually mark the end of a successful and error-free mysql file.

    Thank you.

    Plugin Support chandelierrr

    (@shanedelierrr)

    Hi @flaviowordpress, you’re welcome!

    I reached out to our lead developer regarding your question about the blank lines at the end of the backup file, and I got a confirmation that it is as intended.

    You may check the code in the class-itsec-backup.php file found in core/modules/backup/ directory:

      @fwrite( $fh, PHP_EOL . PHP_EOL ); 
    
    } 
    
    @fwrite( $fh, PHP_EOL . PHP_EOL ); 
    @fclose( $fh );

    Hope this helps! Feel free to let us know if you have other questions.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘DB backup: code truncated in file’ is closed to new replies.