# Error trying to restore my forum

**URL:** https://meta.discourse.org/t/error-trying-to-restore-my-forum/319987
**Category:** Self-hosting
**Created:** [August 3, 2024, 7:55pm UTC](https://meta.discourse.org/t/error-trying-to-restore-my-forum/319987 "2024-08-03T19:55:03Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![David\_Ghost](https://avatars.discourse-cdn.com/v4/letter/d/c37758/32.png) [@David\_Ghost](https://meta.discourse.org/u/David_Ghost)
#### Post date: [August 3, 2024, 7:55pm UTC](https://meta.discourse.org/t/error-trying-to-restore-my-forum/319987/1 "2024-08-03T19:55:03Z")

</div>

Hello, I’m trying to restore my forum from DO to lightsail. Everything went well, but when I try to restore, this error message appears:

[2024-08-03 19:46:08] ERROR: memory required is 77 MB, maintenance\_work\_mem is 64 MB  
[2024-08-03 19:46:08] EXCEPTION: psql failed: ERROR: memory required is 77 MB, maintenance\_work\_mem is 64 MB

how i can fix that, please?

---

<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 3, 2024, 8:14pm UTC](https://meta.discourse.org/t/error-trying-to-restore-my-forum/319987/2 "2024-08-03T20:14:09Z")

</div>

How big is your database?

How much ram do you have?

This is a [standard install](https://meta.discourse.org/t/142537?silent=true)?

---

<div class="post-metadata">

### Author: ![David\_Ghost](https://avatars.discourse-cdn.com/v4/letter/d/c37758/32.png) [@David\_Ghost](https://meta.discourse.org/u/David_Ghost)
#### Post date: [August 3, 2024, 8:15pm UTC](https://meta.discourse.org/t/error-trying-to-restore-my-forum/319987/3 "2024-08-03T20:15:17Z")

</div>

80mb for my database.  
16 GB RAM for the vps  
and yes it’s a [standard install](https://meta.discourse.org/t/142537?silent=true)

---

<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 3, 2024, 8:34pm UTC](https://meta.discourse.org/t/error-trying-to-restore-my-forum/319987/4 "2024-08-03T20:34:42Z")

</div>

Strange.

What I would do is enter the container, install vim, edit the postgres config file to increase the setting it complains about (restart with “sv restart postgres”) and restore from the command line.

---

<div class="post-metadata">

### Author: ![David\_Ghost](https://avatars.discourse-cdn.com/v4/letter/d/c37758/32.png) [@David\_Ghost](https://meta.discourse.org/u/David_Ghost)
#### Post date: [August 3, 2024, 9:42pm UTC](https://meta.discourse.org/t/error-trying-to-restore-my-forum/319987/5 "2024-08-03T21:42:11Z")

</div>

i can’t find this file. You know where i can find it?

---

<div class="post-metadata">

### Author: ![sheng\_hualuo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sheng_hualuo/32/430359_2.png) [@sheng\_hualuo](https://meta.discourse.org/u/sheng_hualuo)
#### Post date: [August 4, 2024, 5:39am UTC](https://meta.discourse.org/t/error-trying-to-restore-my-forum/319987/6 "2024-08-04T05:39:58Z")

</div>

Did you execute this command when you reinstalled discourse./discourse-setup?

---

<div class="post-metadata">

### Author: ![sheng\_hualuo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sheng_hualuo/32/430359_2.png) [@sheng\_hualuo](https://meta.discourse.org/u/sheng_hualuo)
#### Post date: [August 4, 2024, 5:48am UTC](https://meta.discourse.org/t/error-trying-to-restore-my-forum/319987/7 "2024-08-04T05:48:12Z")

</div>

./launcher enter app  
Path: /etc/postgresql/13/main/postgresql.conf  
The 13 in the path is the version number, and our version may not be the same. Go to the /etc/postgresql folder to view it

---

<div class="post-metadata">

### Author: ![David\_Ghost](https://avatars.discourse-cdn.com/v4/letter/d/c37758/32.png) [@David\_Ghost](https://meta.discourse.org/u/David_Ghost)
#### Post date: [August 4, 2024, 10:15am UTC](https://meta.discourse.org/t/error-trying-to-restore-my-forum/319987/8 "2024-08-04T10:15:44Z")

</div>

Yes, and it recognized my RAM automatically.

I even tried to do a new clean installation, but now it gives an error before it finishes uploading.

It seems that nothing works. [I have also tried to restore with rsync.](https://meta.discourse.org/t/postgresql-problem-on-moving-discourse-with-rsync/318771/5)

I will try to restore later by command line when i understand better how to send my backup by command line. For now, im getting a “permission denied (publickey)”. But its not discourse problem.

---

<div class="post-metadata">

### Author: ![sheng\_hualuo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sheng_hualuo/32/430359_2.png) [@sheng\_hualuo](https://meta.discourse.org/u/sheng_hualuo)
#### Post date: [August 4, 2024, 10:57am UTC](https://meta.discourse.org/t/error-trying-to-restore-my-forum/319987/9 "2024-08-04T10:57:03Z")

</div>

You can follow my way to restore website backup.

1. backup the website files and app.yml. download them on top of your Windows
2. reinstall the vps system, debian or Ubuntu is recommended
3. install Docker prerequisites (based on Debian/Ubuntu distro example)

```plaintext
sudo apt install docker.io
sudo apt install git

```

1. Install Discourse

```plaintext
sudo -s
git clone https://github.com/discourse/discourse_docker.git /var/discourse
cd /var/discourse
chmod 700 containers

```

1. Edit the discourse configuration (emphasis added)

```plaintext
. /discourse-setup

```

After executing the command you will be prompted to enter the domain name, you need to use ctrl+c to cancel the operation because you backed up app.yml  
6. Enter the discourse configuration folder

```plaintext
1. cd /var/discourse/containers/ #enter configuration folder
2. rm app.yml #delete the configuration file created by default
3. upload your backup app.yml to this folder
4. cd ... # fallback to the discourse folder
5. . /launcher rebuild app # rebuild discourse

```

1. After rebuilding the discourse, start the restoration process

```plaintext
1. mkdir /var/discourse/shared/standalone/backups/default/ #Create a folder for backup files.
2. cd /var/discourse/shared/standalone/backups/default/ #Go to the folder and upload your site's backup files in this folder.
3. cd /var/discourse/ #Go back to the discourse folder.
4. . /launcher enter app #Enter the discourse container
5. discourse enable_restore #Enable discourse restore function
6. discourse restore your-site-backup.tar.gz # Start restoring the backup by replacing your-site-backup.tar.gz with the name of your site backup file

```

---

<div class="post-metadata">

### Author: ![David\_Ghost](https://avatars.discourse-cdn.com/v4/letter/d/c37758/32.png) [@David\_Ghost](https://meta.discourse.org/u/David_Ghost)
#### Post date: [August 4, 2024, 11:25am UTC](https://meta.discourse.org/t/error-trying-to-restore-my-forum/319987/10 "2024-08-04T11:25:24Z")

</div>

the path is correct i found the line for edit. I put 80mb limit + a restart app and it was worked very well. Im very happy. Thank you very much Sheng and @pfaffman.

---

<div class="post-metadata">

### Author: ![sheng\_hualuo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sheng_hualuo/32/430359_2.png) [@sheng\_hualuo](https://meta.discourse.org/u/sheng_hualuo)
#### Post date: [August 4, 2024, 11:28am UTC](https://meta.discourse.org/t/error-trying-to-restore-my-forum/319987/11 "2024-08-04T11:28:11Z")

</div>

We’re glad I could help you

---

<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 3, 2024, 11:28am UTC](https://meta.discourse.org/t/error-trying-to-restore-my-forum/319987/12 "2024-09-03T11:28:51Z")

</div>

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