# Backup discourse from the command line

**URL:** https://meta.discourse.org/t/backup-discourse-from-the-command-line/64364
**Category:** Self-Hosting
**Tags:** backups, how-to
**Created:** [June 12, 2017, 3:59pm UTC](https://meta.discourse.org/t/backup-discourse-from-the-command-line/64364 "2017-06-12T15:59:45Z")
**Posts on this page:** 1
**Showing post:** 36

<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: [October 28, 2025, 11:23pm UTC](https://meta.discourse.org/t/backup-discourse-from-the-command-line/64364/36 "2025-10-28T23:23:01Z")

</div>

You need to configure s3 in env variables as described in [Configure an S3 compatible object storage provider for uploads](https://meta.discourse.org/t/configure-an-s3-compatible-object-storage-provider-for-uploads/148916)

This is especially true if the s3 settings are different on the new server. Putting the s3 values in the database can cause lots of problems.

But there is a switch for the restore command that makes it pause between the various parts. It can help.

---

_[View the full topic](https://meta.discourse.org/t/backup-discourse-from-the-command-line/64364)._
