# Pause images optimization upon restore to new instance of server

**URL:** <https://meta.discourse.org/t/pause-images-optimization-upon-restore-to-new-instance-of-server/386739>\
**Category:** Product Support\
**Created:** [October 25, 2025, 8:11pm UTC](https://meta.discourse.org/t/pause-images-optimization-upon-restore-to-new-instance-of-server/386739 "2025-10-25T20:11:13Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![adopilot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/adopilot/32/105040_2.png) [@adopilot](https://meta.discourse.org/u/adopilot)\
**Post date:** [October 27, 2025, 7:44am UTC](https://meta.discourse.org/t/pause-images-optimization-upon-restore-to-new-instance-of-server/386739/5 "2025-10-27T07:44:57Z")

</div>

Thanks for helping.

> [@pfaffman](#):
>
> If you need more space you need more space.

Yes but for straightforward restore using web gui and expected procedure you need +4x free size of your backup file.

Here is how:

1. Upload backup file (or rsync into `/var/discourse/shared/standalone/backups/default`)
2. Once when restore is initialized backup file.gz is copied to `/var/discourse/shared/standalone/tmp/restores/`
3. During restore backup file in `/var/discourse/shared/standalone/tmp/restores/` folder is unpacked
4. From tmp folder uploads are rsync to native place and sql dump being inserted to pg database.

How I managed to success restore.

During restore process once when discource copied file from restore folder to temp i did delete original backup file uploaded to over ssh.

Once again when discource finished with sql inserts and stat rsync unpacked files from tmp folder to /var/discourse/shared/standalone/uploads/ I manually deleted bakupxxx.tar.gz file in temp folder over ssh without interrupting the process of restore.

Once when my instance was online and rsync finished I did

`rm -rf /var/discourse/shared/standalone/tmp/restores/default/*`

If you backup large restore process my seems death and instance over web start returning error code 500 (happened to me twice) you can check restore process by entering into app

```plaintext
cd /var/discourse
./launcher enter app

ps aux | grep restore

```

Also since my db restore was too long

```plaintext
cd /var/discourse
./launcher enter app
watch -n 10 “sudo -u postgres psql discourse -c "SELECT now(), state, query FROM pg_stat_activity WHERE state != ‘idle’;"”

```

Helped me to monitor db restore progress, to see that is restore is still alive.

---

_[View the full topic](https://meta.discourse.org/t/pause-images-optimization-upon-restore-to-new-instance-of-server/386739)._
