# Set backup location to secondary drive?

**URL:** https://meta.discourse.org/t/set-backup-location-to-secondary-drive/274862
**Category:** Self-hosting
**Tags:** backups
**Created:** [August 11, 2023, 9:31pm UTC](https://meta.discourse.org/t/set-backup-location-to-secondary-drive/274862 "2023-08-11T21:31:55Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![JJ\_IA](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jj_ia/32/317035_2.png) [@JJ\_IA](https://meta.discourse.org/u/JJ_IA)
#### Post date: [August 11, 2023, 9:31pm UTC](https://meta.discourse.org/t/set-backup-location-to-secondary-drive/274862/1 "2023-08-11T21:31:55Z")

</div>

I want to set my backup location to a secondary drive on the local machine. I only see “local” and “s3” options, and “local” doesn’t seem to let me specify the location on the machine. Reasons:

1. This saves space on the primary drive as the data grows in size
2. Avoids a total loss of data if the primary drive fails

Is the only way to do this to write a cron job to move the .tar.gz file from shared/web-only/backups/default/ to the other drive?

Thanks!

---

<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: [August 11, 2023, 11:45pm UTC](https://meta.discourse.org/t/set-backup-location-to-secondary-drive/274862/2 "2023-08-11T23:45:41Z")

</div>

You could set the location of the backup folder in the app.yml to be on the other drive.

---

<div class="post-metadata">

### Author: ![JJ\_IA](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jj_ia/32/317035_2.png) [@JJ\_IA](https://meta.discourse.org/u/JJ_IA)
#### Post date: [August 12, 2023, 1:17am UTC](https://meta.discourse.org/t/set-backup-location-to-secondary-drive/274862/3 "2023-08-12T01:17:28Z")

</div>

Wonderful! I don’t see a commented out example line for that. What would that line look like in the yml file? Like the following…?

```plaintext
 - volume:
      host: /mnt/my_backup_drive/discourse_backup
      guest: /public/backups/default

```

---

<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: [August 12, 2023, 6:20am UTC](https://meta.discourse.org/t/set-backup-location-to-secondary-drive/274862/4 "2023-08-12T06:20:33Z")

</div>

I think it’s `/shared/backups/default`, or just `/shared/backups`. You just need to destroy she start the container to test.

---

<div class="post-metadata">

### Author: ![JJ\_IA](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jj_ia/32/317035_2.png) [@JJ\_IA](https://meta.discourse.org/u/JJ_IA)
#### Post date: [August 12, 2023, 6:51am UTC](https://meta.discourse.org/t/set-backup-location-to-secondary-drive/274862/5 "2023-08-12T06:51:52Z")

</div>

Worked. Thanks @pfaffman!

---

<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: [September 11, 2023, 6:52am UTC](https://meta.discourse.org/t/set-backup-location-to-secondary-drive/274862/6 "2023-09-11T06:52:28Z")

</div>

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