Local update copies
Where the copies the tracker makes before each update are kept, how to check them, pin them and delete old ones.
Before installing a new release, the tracker saves a copy of the data and of the previous installation files on the server. It uses this copy to bring back the previous version if the update fails the check. Copies are not deleted automatically: you check and clean them up manually in the Local update copies («Локальные копии обновлений») block on the Settings → Updates («Настройки → Обновления») tab. The tab is visible to the owner and the admin; the block works only for the installation owner.
What a local update copy is
The copy is created at the “Creating a backup” («Создание резервной копии») stage of an update from the panel. It contains the tracker's data and the files of the installed version.
The copy is kept on the same server as the tracker:
- the data — in the
micator_update_stateDocker volume; - the previous installation files and the release files — in the
/opt/micator/.updates/workdirectory. If the tracker is installed in a different directory, the.updates/workfolder is inside it.
In installations made before this release, the volume is called tracker_update_state, and the default directory is /opt/tracker/.updates/work, see names in such installations.
The copy stays on disk both after a successful update and after a return to the previous version. After a completed update, you cannot bring back the previous version from such a copy through the panel. To restore data, and in case the server is lost, connect a separate storage server — see Backups: getting started.
Checking copies and free space
- Open Settings → Updates.
- Expand the Local update copies block.
- Click Check copies («Проверить копии»).
A “Space check” («Проверка места») panel appears lower on the tab. Traffic does not stop. When the stage in the panel changes to “Done” («Готово»), the block shows:
- the line “Checked … · X of Y free” («Проверено <дата> · свободно X из Y») — the free space on the disk where the tracker is installed;
- the list of copies. Each row has a name, size, date and state.
A row is called “Before updating to …” («Перед обновлением до <версия>») if it is a copy made before a release was installed. The “Service files” («Служебные файлы») row holds the working files of operations that have no record of a release installation, for example update check files. Instead of a date, such a row shows “Date unknown” («Дата неизвестна»).
If there are no copies, the block says “No local update copies.” («Локальных копий обновлений нет.»)
After a tracker update, the list is not recalculated by itself. Click Check copies again to see the new copy and its size.
Copy states
| State | What it means | Deleted on cleanup |
|---|---|---|
| “pinned” («закреплена») | The copy was pinned with the Pin («Закрепить») button | No |
| “latest copy” («последняя копия») | One of the two newest copies. The tracker always keeps the two latest | No |
| “can be cleaned up” («можно очистить») | A copy of a completed update that is older than the two latest | Yes |
| “protected” («защищена») | The files of an update that ended with the “Not completed” («Не завершено») result, or the “Service files” row | No |
Copies of updates that ended successfully or with a return to the previous version count toward the two latest.
Pinning and unpinning
A pinned copy is not deleted on cleanup.
- Click Check copies if the list is not shown yet.
- Click Pin in the row of the copy you need.
The tracker runs the check again by itself, and the copy gets the “pinned” state. The button in the row changes to Unpin («Открепить»). After you unpin it and run a new check, the copy gets the state it would have had without pinning.
Cleaning up old copies
The cleanup button appears below the list only if there is at least one copy in the “can be cleaned up” state. The button shows the amount of space that will be freed, for example Clean up old · 12.4 GB («Очистить старые · 12,4 ГБ»).
- Click Check copies.
- Pin the copies you want to keep.
- Click Clean up old.
- Confirm the browser prompt “Delete N old local copies and release files (size)? Deletion cannot be undone; protected copies will remain.” («Удалить N старых локальных копий и файлов выпусков (размер)? Удаление необратимо; защищённые копии останутся.»)
The “Cleaning up old copies” («Очистка старых копий») operation runs lower on the tab. Traffic does not stop. After it finishes, the list and the free space are recalculated.
Cleanup deletes copies in both storage locations — both the data and the files from the .updates/work directory. It does not touch:
- the two latest copies, pinned copies and protected copies;
- the running tracker, its data and stats;
- copies on the storage server and local restore copies — they are managed on the Backups («Резервные копии») tab, see Backup retention, pinning and cleanup.
A deleted update copy cannot be brought back. Pin the copies you need before cleanup.
Check
- Wait for the “Done” stage in the “Cleaning up old copies” panel.
- Make sure there are no “can be cleaned up” rows left in the list and the Clean up old button is gone.
- Compare the “X of Y free” line with the value before cleanup.
The “Space check” and “Copy cleanup” («Очистка копий») entries with the “Done” result remain in the Operation history («История операций») block at the bottom of the tab.
If it did not work
The Local update copies block is missing from the tab
The block is shown in an installation labeled Client installation («Клиентская установка») when the installation service on the server supports working with copies. If there is no block and the line under the tracker version reads “Installation service: previous version · protocol 1” («Служба установки: прежняя версия · протокол 1»), update the service with a command on the server — see Updating the installation service. Traffic does not stop. After the service is updated, open the tab again.
“Updates are available only to the installation owner” («Обновления доступны только владельцу установки»)
The tab was opened by someone other than the installation owner, and this message is shown instead of its content. Log in with the login and password of the owner account created in the first-run wizard. In log in as user mode, the block is not available.
“Another operation is already running on the server. Wait for it to finish.” («На сервере уже выполняется другая операция. Дождитесь её завершения.»)
An update, backup creation or restore is running. Wait for the operation to finish and click Check copies again.
“Automatic restore did not complete. Traffic remains paused. A server administrator needs to check it.” («Автоматическое восстановление не завершилось. Трафик остаётся на паузе. Нужна проверка администратором сервера.»)
The return to the previous version after a failed update did not complete. While this message is shown on the tab, the block's buttons are inactive. For what the server administrator should do, see Lock.
There is no Clean up old button
The list has not been checked yet, or there is nothing to delete: all copies are among the two latest, pinned or protected. Click Check copies. If an unneeded copy is pinned, click Unpin in its row.
Other messages on the tab are covered in Messages and what to do.