Title: Database Backups Location
Last modified: August 21, 2016

---

# Database Backups Location

 *  [NickB](https://wordpress.org/support/users/nicolasb/)
 * (@nicolasb)
 * [12 years ago](https://wordpress.org/support/topic/database-backups-location/)
 * 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/](https://wordpress.org/plugins/better-wp-security/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Kurt Flint](https://wordpress.org/support/users/kurtflint/)
 * (@kurtflint)
 * [12 years ago](https://wordpress.org/support/topic/database-backups-location/#post-4963155)
 * 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.
 *  [ls5302](https://wordpress.org/support/users/ls5302/)
 * (@ls5302)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/database-backups-location/#post-4963330)
 * 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…
 *  [dwinden](https://wordpress.org/support/users/dwinden/)
 * (@dwinden)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/database-backups-location/#post-4963331)
 * [@nicolasb](https://wordpress.org/support/users/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

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Database Backups Location’ is closed to new replies.

 * ![](https://ps.w.org/better-wp-security/assets/icon.svg?rev=3529351)
 * [Kadence Security – Password, Two Factor Authentication, and Brute Force Protection](https://wordpress.org/plugins/better-wp-security/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/better-wp-security/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/better-wp-security/)
 * [Active Topics](https://wordpress.org/support/plugin/better-wp-security/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/better-wp-security/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/better-wp-security/reviews/)

## Tags

 * [backups](https://wordpress.org/support/topic-tag/backups/)
 * [database](https://wordpress.org/support/topic-tag/database/)

 * 3 replies
 * 4 participants
 * Last reply from: [dwinden](https://wordpress.org/support/users/dwinden/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/database-backups-location/#post-4963331)
 * Status: not resolved