Documentation sections

Backups: getting started

What a backup includes, why you need a separate storage server and an encryption key, how the traffic pause works and how to get your data back.

Backups are set up in the panel: Settings → Backups («Настройки → Резервные копии»). Owners and admins can see the tab, but only the installation owner can work with backups — the owner account with the login set in the first-run wizard. This page gives an overview of the section; the details of each action are behind the links.

Why back up automatically to another server

A backup on a separate server helps you restore the tracker after losing the main VPS, a disk failure or mistaken changes. If the only backup is kept on the same disk, losing that disk means losing both the tracker and the backup. For storage, choose a separate server, preferably with a different provider.

This is a snapshot of the state, not a second running tracker: traffic is not switched to the storage server automatically. Data is restored as of the chosen backup; anything that appeared after it is not in that snapshot.

The workflow: intake pause → local snapshot → tracker start → encryption and upload over SFTP → upload check → finished backup on another server. An unfinished upload does not count as a finished backup.

Once the encryption key has been created and confirmed, the backup is encrypted on the tracker server before it is sent and is stored on the storage server in encrypted form. It can be opened only with the key file, which only you have — see Backup encryption. Without this file, the backup cannot be restored.

How to turn on scheduled backups

  1. Create an encryption key and save the key file outside the tracker server and the storage server — creating the key.
  2. Connect a storage server: public IP, SSH port, user, password or key, directory and fingerprint check — fields and connection check.
  3. Turn on Create backups on a schedule («Создавать копии по расписанию»), choose the frequency, time and time zone, and confirm stopping traffic on schedule — detailed setup.
  4. Choose the time with the least traffic. It is set in the chosen time zone; the server's row shows the next run in that time zone and in UTC.
  5. Set up retention of the latest backups. You can pin the checkpoint snapshots you need so that automatic cleanup does not remove them — retention rules.
  6. Create the first backup manually and run Verify for restore («Проверить для восстановления») with the key file. Then check the history after the first scheduled run: having a schedule does not by itself confirm a successful backup.

If you lose the main server, use restore on a new server. To get data back on a running installation, use the in-place restore. Checking an archive does not replace a trial restore on an isolated server.

What a backup includes

A backup is always full and covers all workspaces of the installation:

  • campaigns, users, settings and the postback sending queue;
  • statistics;
  • uploaded landing pages and offers;
  • the click queue and the tracker state;
  • server configuration files with the installation keys, and geo databases.

HTTPS certificates, storage server credentials and the backup encryption key are not included in the backup. You cannot download a backup from the panel to your browser.

Separate storage server

The tracker does not keep backups on its own server: it keeps them on your server, which it connects to over SSH/SFTP. The snapshot is assembled on the tracker's disk, uploaded to the storage server and then deleted from the tracker's disk. If the tracker server is lost, the backup remains on the storage server, and the tracker is restored from it on a new server. A backup cannot be created without a connected storage server.

  • The server is specified by its public IP address; a domain name is not accepted.
  • Login is with an SSH key or a password.
  • Backups are stored in the tracker-backups subfolder inside the specified folder.
  • You can connect up to 10 servers.
  • A new storage server can be connected only after the encryption key has been created and confirmed. From that moment, every new backup on the storage server is encrypted.
  • In an installation where storage servers are connected but encryption is not enabled yet, backups are stored on the storage server unencrypted and contain the installation's server keys. The panel shows the “Backups are not encrypted” («Копии не зашифрованы») banner.

The form fields, the fingerprint check and how credentials are stored are covered on the Connecting a backup storage server page. By default, all backups are kept. The rule for keeping the latest backups, pinning and cleanup are covered on the Backup retention, pinning and cleanup page.

Traffic pause

While the snapshot is being created, the tracker stops accepting clicks and postbacks. The length of the pause depends on the amount of data. The backup is uploaded to the storage server after the tracker has started again, and traffic is accepted during that time.

The pause starts only with your consent:

  • for a manual backup — the I allow traffic intake to be stopped temporarily («Разрешаю временно остановить приём трафика») checkbox;
  • for a scheduled backup — the I allow traffic to be stopped on schedule («Разрешаю остановку трафика по расписанию») checkbox.

A scheduled backup is created every day, once a week, once a month or once every 3 months at the chosen time and in the chosen time zone. The schedule is turned on with the Create backups on a schedule checkbox when connecting the server, or later with the Schedule («Расписание») button in the server's row. The stages and the schedule are covered on the Creating a backup and the schedule page.

Warning.

Requests that arrive during the pause get a 503 response: the tracker does not save them and does not process them later. A scheduled backup stops traffic the same way as a manual one.

Verification and restore

An in-place restore takes two steps.

  1. Verify the backup with the Verify for restore button. For an encrypted backup, the panel asks for the key file. The tracker downloads the backup, decrypts it and checks file integrity, archive safety and compatibility with the installation. Traffic is not stopped. The verification is valid for an hour after it finishes.
  2. Start the restore with the Restore… («Восстановить…») button in the “Backup passed verification” («Копия прошла проверку») card. The tracker stops traffic, saves an emergency backup of the current state and replaces the data of all workspaces with the backup data. If an error occurs, it tries to roll back to the emergency backup by itself.

After an in-place restore, the panel and tracking domains, HTTPS certificates and storage credentials stay as they are now. Changes made after the backup was created are lost. Postbacks that were waiting to be sent in the backup are not sent automatically: in the delivery log they have the result “Restored from backup · needs reconciliation” («Восстановлено из копии · нужна сверка») — see Event delivery log.

The steps are on the Backup verification and in-place restore page. Moving the tracker to an empty server is covered on the Restoring on a new server page.

Backup before an update

Before installing a new release on the Settings → Updates («Настройки → Обновления») tab, the tracker saves a backup of the data by itself. Click and postback intake is paused during the backup and the update. If the new version fails the check, the tracker returns to the previous version together with the data — see Updating the tracker from the panel.

These backups are stored on the tracker server, not on the storage server, are not encrypted and are not deleted automatically. They are needed for the automatic version rollback and do not replace the backups on the storage server. How to check, pin and clean them up is covered on the Local update copies page.

First backup step by step

The snapshot is first assembled on the tracker's disk, so the disk needs free space — see Creating a backup and the schedule.

  1. Log in to the panel as the installation owner.
  2. Open Settings → Backups.
  3. In the Backup encryption («Шифрование копий») block, click Create key («Создать ключ») and complete both steps — see Creating the key.
  4. Click + Storage server («+ Сервер хранения»).
  5. Connect the server following the Connecting a backup storage server page.
  6. In the server's row, click Create backup («Создать копию»).
  7. Select the I allow traffic intake to be stopped temporarily checkbox.
  8. Click Create backup.
  9. Wait until the stage in the Creating a backup («Создание копии») banner changes to “Done” («Готово»).

Progress is visible even during the pause, and you can leave the tab open.

Checking the result

  1. Click Backups and restore («Копии и восстановление») in the server's row.
  2. In the Backups («Копии») block, find the new backup with the “backup of this installation” («копия этой установки») and “encrypted” («зашифрована») labels.
  3. Click Verify for restore.
  4. In the “Verify backup for restore” («Проверить копию для восстановления») window, choose the key file and click Verify backup («Проверить копию»).
  5. Wait for the “Backup passed verification” card.

A record of each operation remains in the Operation history («История операций») block.

Frequently asked questions

Backups are available only to the installation owner («Резервные копии доступны только владельцу установки»)

You are not logged in as the installation owner, or you are in Log in as mode. Log in to the panel as the installation owner with your login and password. Backups are also unavailable with an API token — see Admin API: license, backups and updates.

Can I create a backup without stopping traffic?

No. The snapshot is taken while click and postback intake is stopped. Backup verification, the server disk space check and backup cleanup do not stop traffic.

The backup does not match this installation: the schema, database versions or server keys differ. («Копия не подходит к этой установке: отличаются схема, версии баз или серверные ключи.»)

The backup was made on another installation or before an update that changed the data structure. It cannot be restored in place — see Backup verification and in-place restore.

Do backups work when the license has expired?

The tab is closed along with the rest of the panel until renewal — see License expiry: what is closed and what keeps working. Scheduled backups continue to be created.

Can I turn off encryption?

No. After the key is confirmed, the tracker does not send unencrypted backups to storage. The key can only be replaced — see Replacing the key.

What if the key file is lost?

Backups encrypted with it cannot be restored. Replace the key and create a new backup right away.

Updated Need help? ↗