Answers.Body: <p>Yes you can use the <code>backupDbOnUpdate</code> config setting:</p>
  
  <p><a href="https://craftcms.com/docs/config-settings#backupDbOnUpdate" rel="nofollow noreferrer">https://craftcms.com/docs/config-settings#backupDbOnUpdate</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-10T16:16:16.933Z
Answers.LastActivityDate: 2017-07-10T16:16:16.933Z
Answers.UserDisplayName: andrew.welch
Answers.Body: <p>A little update for those interested.
  From version 3.x of Craft CMS, the command to insert in config/general.php to skip the database backup when updating, is the following:</p>
  <pre><code>-&gt;backupOnUpdate(false)
  </code></pre>
  <p>Here is the documentation:
  <a href="https://craftcms.com/docs/3.x/config/config-settings.html#backuponupdate" rel="nofollow noreferrer">https://craftcms.com/docs/3.x/config/config-settings.html#backuponupdate</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-07-17T13:21:55.180Z
Answers.LastActivityDate: 2024-07-17T13:23:34.113Z
Answers.LastEditDate: 2024-07-17T13:23:34.113Z
Answers.UserDisplayName: Jack
Body: <p>When Craft tries to apply an update, it tries to back up the database. Although that's great in general, backing up a large database using PHP requires a lot of memory and resources that might not be available in the hosting environment or the client does not have enough access to make any related adjustments. </p>
  
  <p>Is there a setting of some kind that would prevent Craft CMS from backing up the database when updating? I already use a command line script to backup the database before applying an update.</p>
  
Tags: <updating>
Title: Is there a way to prevent Craft from backing up the database before updating?
ThreadText: # Is there a way to prevent Craft from backing up the database before updating?
  
  (Asked by: username_0 on 2017-07-10)
  
  When Craft tries to apply an update, it tries to back up the database. Although that's great in general, backing up a large database using PHP requires a lot of memory and resources that might not be available in the hosting environment or the client does not have enough access to make any related adjustments.
  
  Is there a setting of some kind that would prevent Craft CMS from backing up the database when updating? I already use a command line script to backup the database before applying an update.
  
  **Tags:** updating
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2017-07-10. Score: 4 | Accepted answer
  
  Yes you can use the `backupDbOnUpdate` config setting:
  
  <https://craftcms.com/docs/config-settings#backupDbOnUpdate>
  
  
  ---
  
  ### Answer by username_2 on 2024-07-17. Score: 1
  
  A little update for those interested.
  From version 3.x of Craft CMS, the command to insert in config/general.php to skip the database backup when updating, is the following:
  
  ```
  ->backupOnUpdate(false)
  
  ```
  
  Here is the documentation:
  <https://craftcms.com/docs/3.x/config/config-settings.html#backuponupdate>
  
  
  ---
  
  