WordPress.org

Forums

iThemes Security (formerly Better WP Security)
Database Backups Location (4 posts)

  1. NicolasB
    Member
    Posted 1 year ago #

    Hey guys,

    I'm using iThemes Security Version 4.2.6 and the database backups location does not seem to be updated correctly when saving a new path. It does update the itsec_backup option value in the wp_options database table, but whenever I try to dump $itsec_globals['ithemes_backup_dir'], all I get is the default value set in:

    better-wp-security/core/class-itsec-core.php
    line 89:
    'ithemes_backup_dir' => $upload_dir['basedir'] . '/ithemes-security/backups',

    Changing this line of code for something like this works:

    'ithemes_backup_dir' => '/var/www/backups',

    Any idea why this variable never gets overriden when saving changes?

    Thanks alot for your time!

    https://wordpress.org/plugins/better-wp-security/

  2. Kurt Flint
    Member
    Posted 1 year ago #

    Hey there, it might relate to what I'm about to open, a bug where there is the ngnix.conf file path in the field marked as being the backup location string on the setup page.

    Maybe see "UI error on Settings page" to see if that helps when they get to it.

  3. ls5302
    Member
    Posted 6 months ago #

    This appears to still be an issue in Version 4.5.10.

    Again if I modify the default path everything works. Otherwise, the desired path does not appear any where within the $itsec_globals array which is what used to save the SQL / ZIP file.

    Bump...

  4. dwinden
    Member
    Posted 6 months ago #

    @NicolasB,

    Question: Any idea why this variable never gets overriden when saving changes?

    Answer: Probably because the iTSec plugin needs this value for the "Restore Default Location" button in the Settings tab\menu option ...

    It looks like the problem is that in the execute_backup() function the
    path from the global $itsec_globals['ithemes_backup_dir'] is used for saving the backup file(s) instead of the path from $this->settings['location'].

    It needs to be replaced 10 times in the execute_backup() function to fix this issue !

    Please note that changing the backup location will impact the "Backups to Retain" feature since it only works for 1 location: the current backup dir. So after fixing this issue when you decide to change the backup dir, retain will stop working in the old location. That means you probably need to move the existing backups from the old location to the new location or you will have to delete them manually.

    Haven't tested this yet so its all just theory for now ...

    dwinden

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic