docs(en): Remove "Deleting old system" how-to (#120)

@alexoundos :
> Deleting old system section is no longer valid for new installations since our release in January. /old-root folder gets removed during NixOS boot. Old installations might still need these instructions unless VM is rebooted after an upgrade.

Reviewed-on: https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org/pulls/120
Reviewed-by: Inex Code <inex.code@selfprivacy.org>
Co-authored-by: nevfy <yaver4.0.0.0@gmail.com>
Co-committed-by: nevfy <yaver4.0.0.0@gmail.com>
This commit is contained in:
nevfy 2024-08-24 21:27:30 +03:00 committed by Inex Code
parent 8d1afd679f
commit a8a46f0395
2 changed files with 2 additions and 55 deletions

View file

@ -105,31 +105,4 @@ rm /var/log/nginx/* && systemctl reload nginx
```
As you can see, we don't just delete the files, but also reload Nginx.
This is because Nginx will get confused by the missing log files, and they will not be recreated until Nginx is reloaded.
## Deleting old system
{{% alert color="danger" %}}
This operation can only be performed once during the lifetime of your server.
If you have installed SelfPrivacy on your own hardware, this may lead to some data loss.
{{% /alert %}}
When you install SelfPrivacy on a server, the existing system gets replaced by NixOS. But the old system is still there
and takes up disk space, so you can roll back to it if you want.
To measure how much disk space the old system takes up, run the following command:
```bash
du -h --max-depth=1 /old-root/
```
If there is no old system in place, you will see `du: cannot access '/old-root/': No such file or directory`.
But if you do have an old system, you may delete it by running the following command:
```bash
rm -rf /old-root/
```
This usually frees up around 1.8 GiB of disk space on typical SelfPrivacy servers.
This is because Nginx will get confused by the missing log files, and they will not be recreated until Nginx is reloaded.

View file

@ -99,30 +99,4 @@ rm /var/log/nginx/* && systemctl reload nginx
```
Как вы видите, мы не просто удаляем файлы, но и перезагружаем Nginx.
Это происходит потому, что Nginx запутается в отсутствующих лог-файлах, и они не будут воссозданы, пока Nginx не будет перезагружен.
## Удаление старой системы
{{% alert color="warning" %}}
Эта операция может быть выполнена только один раз за все время существования вашего сервера.
Если вы установили SelfPrivacy на собственное оборудование, это может привести к некоторой потере данных.
{{% /alert %}}
Когда вы устанавливаете SelfPrivacy на сервер, существующая система заменяется на NixOS. Но старая система все еще существует и занимает место на диске, поэтому вы можете откатиться к ней, если захотите.
Чтобы определить, сколько места на диске занимает старая система, выполните следующую команду:
```bash
du -h --max-depth=1 /old-root/
```
Если старой системы нет, вы увидите сообщение `du: cannot access '/old-root/': No such file or directory`.
Но если у вас есть старая система, вы можете удалить ее, выполнив следующую команду:
```bash
rm -rf /old-root/
```
Это обычно освобождает около 1,8 Гб дискового пространства на типичных серверах SelfPrivacy.
Это происходит потому, что Nginx запутается в отсутствующих лог-файлах, и они не будут воссозданы, пока Nginx не будет перезагружен.