Compare commits

..

3 Commits

Author SHA1 Message Date
dettlaff 9b0ffa770d docs: fix from review 2023-11-27 00:31:14 +04:00
def 95fa7d9bce docs: change button naming 2023-11-17 02:34:49 +02:00
def b870243bc5 docs: upd eng backups 2023-11-17 02:28:30 +02:00
45 changed files with 31 additions and 262 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 264 KiB

BIN
assets/images/1-en.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 264 KiB

BIN
assets/images/1-ru.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 KiB

BIN
assets/images/2-en.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 KiB

BIN
assets/images/2-ru.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 KiB

BIN
assets/images/3-en.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 KiB

BIN
assets/images/3-ru.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 KiB

BIN
assets/images/4-en.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 KiB

BIN
assets/images/4-ru.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 199 KiB

BIN
assets/images/5-en.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 199 KiB

BIN
assets/images/5-ru.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

View File

@ -11,13 +11,13 @@ description: >
When your service is broken but it worked yesterday you have two options:
* Spend some time reading logs and debugging what went wrong. Meanwhile the service is unusable and maybe some data is irreversibly lost.
* Rewind the service to the working state and then debug at a more relaxed pace. Hopefully it was just solar flare or a glitch in the Matrix.
* Spend some time reading logs and debugging what went wrong. Meanwhile the service is unusable and maybe some data is irreversibly lost;
* Restore the service to a working state and then debug at a more relaxed pace. Hopefully it was just solar flare or a glitch in the Matrix.
This second, nerve-saving option is enabled by backing up regularly, and even better, automatically.
As an extra benefit, backing up makes it easy to transfer a service from one machine to another with minimal hassle.
This is useful for datacenters on fire, if your server provider gets bought out by another corporation or if shareholders decide that it is finally time to make more profit.
Having a backup simplifies the process of transferring a service between machines, ensuring minimal inconvenience.
This is useful for datacenters on fire, if your server provider gets bought out by another corporation, or when shareholders decide that it is finally time to make more profit.
This document covers the basic terms and usage of SelfPrivacy backup subsystem.
@ -25,45 +25,44 @@ This document covers the basic terms and usage of SelfPrivacy backup subsystem.
SelfPrivacy does not make backups of the whole machine.
Instead, it saves the states of each service.
The state of files used by a service, taken at a certain time, is called a Snapshot.
In the interface, you can see a snapshot as having an id, a service it backs up, and a date of creation.
The state of the files used by a service, taken at a certain time, is called a Snapshot.
In the interface, you can see that a snapshot has an ID, a service it backs up, and a date of creation.
## When backups occur?
A snapshot is created in 3 cases:
* By user's manual command to back up a service
* Automatically at certain intervals if Automatic Backups are enabled
* As a precaution before an inplace restore of a service
* By user's manual command to back up a service;
* Automatically at specified intervals if Automatic Backups are enabled;
* As a precaution before an inplace restore of a service.
## How the data is stored?
The service's files are stored at the cloud of user's choosing.
At the moment we support Backblaze but more are to be added.
The service's files are stored at the cloud of the user's choice.
We currently support Backblaze, but more will be added.
All of the service data is encrypted with a local secret which the cloud never receives.
Under the hood, we use Restic for transfers of encrypted data.
All of the service data is encrypted with a local secret that the cloud never receives.
Under the hood, we use Restic to transfer of encrypted data.
Clouds like Backblaze have an option to disallow immediate removal of data.
Cloud storage providers like Backblaze have an option to disallow immediate deletion of data.
SelfPrivacy app uses this option so that in case when the server is hacked the data cannot be erased.
## Listing snapshots
There are 2 factors to keep in mind when looking at the list:
* For the sake of performance, the list is cached. If some snapshots are missing which you think should be there, invalidate the cache so it reloads.
* If you remove some snapshots, they will disappear from the list, but for some limited time they are still restorable with the help of the cloud.
* For the sake of performance, the list is cached. If some snapshots are missing which you think should be there, invalidate the cache so it reloads;
* If you delete some snapshots, they will be removed from the list, but for some limited time they are still restorable with the help of the cloud.
## Restoring a snapshot
When you restore a snapshot, the service is stopped, and all of its files are restored to the state when the snapshot was taken.
There are 2 ways to do it.
There are two ways to restore a snapshot, which stops the service and restores all files to the state when the snapshot was taken.
The safest one, the default one, is to download the snapshot in its entirety, verify that data is not damaged, and replace the service files with the files from the snapshot.
This has a downside that you need to have extra space to store the snapshot.
However, this method requires additional storage space for the snapshot.
A somewhat riskier way is to overwrite the service files directly, without intermediate storage. This needs less space, but if the transfer goes wrong, you end up with a broken service.
To somewhat mitigate this, a pre-restore snapshot is made just before the restoration.
A somewhat riskier way is to overwrite the service files directly, without intermediate storage. It requires less space, but if the transfer goes wrong, you end up with a broken service.
To help reduce the impact, a snapshot is taken just before restoring.
The app does check that we have enough space before attempting a restore.
@ -73,23 +72,23 @@ Forgetting makes the snapshot inaccessible from the server, but deletion itself
## Automatic Backup
If you set up an automatic backup period, all of the services will be backed up regularly according to the period.
If you set up an automatic backup period, all of the services will be backed up based on the set period.
Note that backups are independent per service. If you have services A and B backed up automatically every day in the morning, and then you back up service B manually at noon, then service A's next backup will be in the morning as usual, but B's backups will occur at noons.
If set to zero, autobackups will be disabled.
If it disable, automatic backups will not be performed.
## Restoring after someone has deleted all the snapshots
* Go to your Backblaze/other cloud interface directly.
* Rewind the bucket's state to prior the deletion event.
* Open SelfPrivacy app
* Invalidate snapshot cache
* List the snapshots
* Restore from snapshots as usual
* Go to your Backblaze/other cloud interface directly;
* Rewind the bucket to its previous state before the deletion event;
* Open SelfPrivacy app;
* Update the snapshot list;
* List the snapshots;
* Restore from snapshots as usual.
## Troubleshooting backups
* If you suspect that the snapshot list is inaccurate, try discarding the cache
* If an inplace restore failed, make sure that your cloud is accessible and your contract is active, then try to either restore a snapshot you tried to restore, or a pre-restore snapshot generated automatically
* If you do not have enough space on the disk for a safe restore, try restoring inplace
* If you suspect that the list of snapshots is incorrect, try to update snapshot list;
* If an inplace restore has failed, make sure that your cloud is accessible and your contract is active. Then try to either restore a snapshot you tried to restore, or a pre-restore snapshot that was automatically generated;
* If you do not have enough space on the disk for a safe restore, try restoring inplace.

View File

@ -1,230 +0,0 @@
---
title: "Как сменить dns провайдера на deSEC"
linkTitle: "Смена провайдера на deSEC"
weight: 2
date: 2023-10-21
description: >
Для тех кто хочет сменить своего dns провайдера уже после установки сервера.
categories: ["How-To Guides"]
---
Мы рекомендуем использовать [deSEC](https://desec.io/) вместо [CloudFlare](https://cloudflare.com/). DeSEC нацелен на приватность.
Если вы сначала привязали ваш домен к CloudFlare и теперь хотите сменить провайдера, эта статья для вас.
Внимание, процесс довольно сложен, и если вы чувствуете, что что-то идет не так, можете смело [писать нам в чат](https://selfprivacy.org/ru/docs/faq/#%D0%BA%D0%B0%D0%BA-%D0%BF%D0%BE%D0%BB%D1%83%D1%87%D0%B8%D1%82%D1%8C-%D0%BF%D0%BE%D0%BC%D0%BE%D1%89%D1%8C).
## Переносим сервер имен (nameserver)
Сервер имен — это сервер который переводит ваш домен (буквы) в IP-адрес сервера (цифры).
1. Регистрируемся в [deSEC](https://desec.io/).
2. На [странице "domains"](https://desec.io/domains) нажимаем на кнопку "плюс".
{{< imgproc desec1 Fill "626x287" />}}
3. Вводим свой домен.
4. Копируем "nameservers".
{{< imgproc desec2 Fill "626x287" />}}
Теперь переходим на сайт провайдера, у которого вы покупали домен.
Действия будут схожи для всех провайдеров, мы будем показывать на примере [Namecheap](https://www.namecheap.com/).
1. Переходим в панель управления вашим доменом.
2. Находим там параметр "Authoritative nameservers".
{{< imgproc namechip1 Fill "626x287" />}}
3. Заменяем текущие адреса на те, что мы скопировали из deSEC в инструкции ранее.
4. Сохраняем изменения.
{{< imgproc namechip3 Fill "626x287" />}}
---
## Получаем токен deSEC
1. Авторизуемся в [deSEC](https://desec.io/login)
2. Переходим на страницу [Domains](https://desec.io/domains)
3. Переходим на вкладку **Token management**.
4. Нажимаем на большую кнопку с "плюсом" в правом верхнем углу страницы.
{{< imgproc desec-tokenmanagment Fill "626x287" />}}
5. Должен появиться диалог "**Generate New Token**". Вводим любое имя токена в **Token name**.
*Advanced settings* необязательны, так что ничего там не трогаем.
6. Кликаем **Save**.
7. Обязательно сохраняем "**secret value**" ключ токена, потому что он отображается исключительно один раз.
{{< imgproc dncsec-copy Fill "626x287" />}}
---
## Подключение к серверу
Изменение записи домена может занимать до двух дней, так что рекомендуем вам подождать обновление записей, перед следующими действиями. Иначе ваши сервисы временно перестанут быть доступны.
Понять, что запись обновилась, вы сможете через приложение, либо перейдя по ссылке на один из ваших сервисов (вы увидите ошибку подключения).
Но помните, вы не сможете больше обращаться к вашему серверу по домену, вам нужно будет знать IP-адрес сервера. Его можно узнать, к примеру, в панеле хостер провайдера.
Для следующих действий вам нужно будет подключиться по ssh к серверу с правами администратора. Минимальное понимание работы командной строки приветствуется ;)
Инструкцию по подключению вы сможете [прочитать тут](http://localhost:1313/ru/docs/how-to-guides/root_ssh/).
После подключения к серверу вводим:
```
nano /etc/nixos/userdata/userdata.json
```
Вы оказались в терминальном тектовом редакторе под названием "nano".
Вы редактируете файл ```/etc/nixos/userdata/userdata.json```, и можете использовать стрелочки для перемещения.
Находим в файле такие строчки:
```
"dns": {
"provider": "CLOUDFLARE",
"apiKey": "Тут будет много букв и цифр, это ваш токен"
},
```
Заменяем:
```"provider": "CLOUDFLARE",```
на
```"provider": "DESEC",```
Теперь на следующей строчке убираем ваш старый токен от CloudFlare и вставляем скопированный токен от deSEC.
(Если CTRL+V не работает, попробуйте SHIFT+CTRL+V)
```"apiKey": "Сюда ваш токен",```
Должно получиться так:
```
"dns": {
"provider": "DESEC",
"apiKey": "Ваш токен от deSEC",
},
```
Теперь нажимаем CTRL+X, после клавишу Y.
Если файл сохранился и вы успешно вышли из тектового редактора, вводим команду:
```
nixos-rebuild switch
```
Она пересоберет вашу серверную систему с новыми параметрами.
После выполнения команды можно смело закрывать консоль.
---
## Перенос записей
Входим сразу в [CloudFlare](https://cloudflare.com/) и в [deSEC](https://desec.io/).
#### В интерфейсе deSEC
По [ссылке](https://desec.io/), в панели "Domain Managment" нажмите на ваш домен.
{{< imgproc howtodesec1 Fill "600x350" />}}
Теперь вы можете добавлять к нему новые записи, с помощью кнопки "Плюс".
{{< imgproc howtodesec2 Fill "600x350" />}}
##### В интерфейсе CloudFlare
По [ссылке](https://cloudflare.com/), переходим в настройки вашего домена, который находится в разделе "Websites".
Выбираем ваш домен.
{{< imgproc howcloudflare2 Fill "363x442" />}}
Теперь переходим в "DNS", далее "Records".
{{< imgproc howcloudflare Fill "363x442" />}}
#### Первая запись: api
Орентируясь на пример с скриншота переносим ваши параметры "api" (смотрите на столбик "Name") записи в соответвии с их цветами.
{{< imgproc replace1 Fill "1544x755" />}}
На скриншоте слева — deSEC, а справа Сloudflare. Вам нужно последовательно перенести каждый параметр данной записи.
#### Вторая запись: корневая
Создаём новую запись типа "А", в "IPv4 address" пишем ваш адрес сервера, вы уже писали его в поле "Content" предыдущей записи.
**Все записи переносить не надо!** Вы создали две записи, а третья уже была создана за вас. Давайте проверим, что у нас получилось.
{{< imgproc replace2 Fill "1250x830" />}}
---
## Перенастраиваем приложение
Для правильной работы вам придется сбросить конфиг приложения. **Не забудьте создать ключ восстановления и сохранить его в безопасном месте (менеджере паролей).**.
Как сбросить приложение:
Переходим в "Настройки приложения".
{{< imgproc app1 Fill "590x1221" />}}
Нажимаем "Сбросить конфиг приложения".
{{< imgproc app2 Fill "585x700" />}}
Теперь переходим в раздел "Мастер установки", где вы настраивали свой сервер, когда в первый раз запускали приложение.
{{< imgproc app3 Fill "590x1221" />}}
Нажимаем "Подключиться к существующему серверу SelfPrivacy".
(В старых версиях приложения кнопка может называться "Подключиться к уже существующему серверу").
{{< imgproc app4 Fill "590x1221" />}}
Далее следуем указаниям в приложении и вводим ключ восстановления или код с другого устройства, где установлено приложение SelfPrivacy.
После установки вы увидите некоторые проблемы с Доменом и DNS. Приложение предложит вам исправить их. Соглашаемся.
{{< imgproc app5 Fill "590x1221" />}}
{{< imgproc app6 Fill "590x500" />}}
**Поздравляем! Вы успешно сменили доменного провайдера. Рекомендуем вам проверить, что все сервисы работают корректно.**

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 247 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 249 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB