> For the complete documentation index, see [llms.txt](https://vitrina-blogerov.gitbook.io/bloggers-showcase/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vitrina-blogerov.gitbook.io/bloggers-showcase/product-docs/product-docs-en/database-management.md).

# Database management

## Utilities. Database management

A common content utility is used to manage platform data:

```bash
sudo /opt/bloggers_platform/content.sh
```

It is installed together with the platform and works only with the language versions that are actually installed on the server.

{% hint style="info" %}
The utility does not translate texts. If you move content from the Russian version to the English one, the texts will be copied as is. Translation must be done manually.
{% endhint %}

### What the utility is for

The utility handles operations that are dangerous to perform manually:

* create a database backup;
* restore the database from a backup;
* move content from one language version to another;
* create a temporary rollback point before a dangerous action.

### Types of backups

{% tabs %}
{% tab title="Manual" %}
Manual copies are created by the user through the menu. They are considered permanent and are not overwritten automatically.

Folder:

```
/opt/bloggers_platform/backups/manual
```

{% endtab %}

{% tab title="Temporary" %}
Temporary copies are created before restoration or import. They are needed as a quick rollback if something goes wrong with the operation.

Folder:

```
/opt/bloggers_platform/backups/temp
```

{% endtab %}

{% tab title="Export" %}
Export packages are used to transfer content between language versions.

Folder:

```
/opt/bloggers_platform/backups/exports
```

{% endtab %}
{% endtabs %}

### Manual backup

In the menu, select:

```
Create manual backup
```

Then select the language version. The utility will create `.dump`-file of the selected version's database.

### Restoring from a backup

In the menu, select:

```
Restore from backup
```

Then select the target language version and the backup file.

Before restoring, the utility asks for confirmation:

```
RESTORE
```

{% hint style="warning" %}
Restoring replaces the entire database of the selected version: content, settings, administrators, bot users, and secrets that were in the selected backup.
{% endhint %}

### Transferring content between versions

In the menu, select:

```
Export/import content between versions
```

Then select the source and target language versions.

Before importing, the utility asks for confirmation:

```
IMPORT
```

When transferring, the target content tables are replaced with data from the source version. Related files from `assets` are copied if they are mentioned in the content.

### What is transferred

Storefront data and safe content settings are transferred:

* blogger cards;
* social networks and prices;
* categories;
* tags;
* blogger-tag links;
* safe appearance and text settings;
* bot message settings related to content.

### What is not transferred

{% hint style="success" %}
Secrets and user data are not imported when transferring content. This allows language versions to remain independent.
{% endhint %}

Not transferred:

* administrators;
* Telegram bot users;
* Telegram bot token;
* channel ID;
* JWT settings;
* AI provider keys;
* database passwords;
* application secrets.

<details>

<summary>What happens to containers during the operation</summary>

Before restoring or importing, the backend and bot of the selected version are temporarily stopped. After the operation is complete, they are started again.

This is needed so the database does not change during restoration or transfer.

</details>

### Quick version backup

Each language version has its own manager. For example, for the Russian version:

```bash
sudo /opt/bloggers_platform/apps/ru/manager.sh backup
```

It creates a copy of the database and archives the folder `assets` inside:

```
/opt/bloggers_platform/apps/ru/backups
```

For regular work with multiple languages, it is more convenient to use the common command `content.sh`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://vitrina-blogerov.gitbook.io/bloggers-showcase/product-docs/product-docs-en/database-management.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
