# Configuring automatic backups

**URL:** https://meta.discourse.org/t/configuring-automatic-backups/262067
**Category:** Support
**Created:** [April 18, 2023, 10:53am UTC](https://meta.discourse.org/t/configuring-automatic-backups/262067 "2023-04-18T10:53:51Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![MSG160](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/msg160/32/208781_2.png) [@MSG160](https://meta.discourse.org/u/MSG160)
#### Post date: [April 18, 2023, 10:53am UTC](https://meta.discourse.org/t/configuring-automatic-backups/262067/1 "2023-04-18T10:53:51Z")

</div>

I have read about enabling automatic backups [here](https://meta.discourse.org/t/configure-automatic-backups-for-discourse/14855)  
Is it possible to configure the time of day the backup runs, how many backups are retained ? I would also like to enable the backup with a script with Discourse is installed. Is there a method to do this e.g. via app.yml settings.

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [April 18, 2023, 11:31am UTC](https://meta.discourse.org/t/configuring-automatic-backups/262067/2 "2023-04-18T11:31:06Z")

</div>

Hi, MSG160 🙂

> [@MSG160](#):
>
> Is it possible to configure the time of day the backup runs, how many backups are retained ?

You can find all the related information in `/admin/site_settings/category/backups`.

 ![image](https://global.discourse-cdn.com/meta/original/4X/2/6/b/26b7e3696cef01308b9d4b47b4779bb60306d829.png)

> [@MSG160](#):
>
> I would also like to enable the backup with a script with Discourse is installed.

I don’t understand that part, however. Can you explain it a bit more precisely? 🙂

---

<div class="post-metadata">

### Author: ![MSG160](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/msg160/32/208781_2.png) [@MSG160](https://meta.discourse.org/u/MSG160)
#### Post date: [April 18, 2023, 12:11pm UTC](https://meta.discourse.org/t/configuring-automatic-backups/262067/3 "2023-04-18T12:11:42Z")

</div>

Thanks for the info, I missed the time of day field in the admin section. Regarding the scripting, we have a process where we install on-prem Discourse instance via a shell script. This installs Discourse docker and automates some config setting changes before rebuild. Is it possible to setup the appropriate backup settings in the config before rebuild or do this another way via the command line e.g. rake task without manually executing launcher to enter app and update settings

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [April 18, 2023, 1:40pm UTC](https://meta.discourse.org/t/configuring-automatic-backups/262067/4 "2023-04-18T13:40:30Z")

</div>

I don’t have enough knowledge on this to help you unfortunately.  
You can list all the available rake tasks with `rake -AT`.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [April 18, 2023, 10:53pm UTC](https://meta.discourse.org/t/configuring-automatic-backups/262067/5 "2023-04-18T22:53:55Z")

</div>

> [@MSG160](#):
>
> . Is it possible to setup the appropriate backup settings in the config

The best way is to configure backup storage on S3 and configure S3 with environment variables. [Configure an S3 compatible object storage provider for uploads](https://meta.discourse.org/t/configure-an-s3-compatible-object-storage-provider-for-uploads/148916) is the best description for how it’s done. If you don’t want assets on S3, don’t configure the uploads bucket.

With that in place you can restore a backup from the command line as described at [Restore a backup from the command line](https://meta.discourse.org/t/restore-a-backup-from-the-command-line/108034).

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [May 18, 2023, 10:54pm UTC](https://meta.discourse.org/t/configuring-automatic-backups/262067/6 "2023-05-18T22:54:30Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
