2.3 KiB
Nstarikov storage migration
Goal
Free space on the root disk without relocating active database, Redis, Docker
runtime, or Meilisearch data. The persistent 100 GB volume mounted at
/var/www/dzen.nstarikov.ru/storage is the destination. It has about 91 GB
available at the time of this design.
Scope and ordering
- Directus PostgreSQL dumps: move
api.nstarikov.ru/backuptostorage/directus-backup; retain 14 most-recent calendar-day dumps and one dump from each of the three most-recent older ISO weeks. The compatibility path remains/var/www/api.nstarikov.ru/backupthrough a symlink, so the existingbackup-pgbind mount continues to work. - Move bot working media with compatibility symlinks:
geopolitics_tg_story/temp_videostostorage/geopolitics-story-tempandvk2ok/storagetostorage/vk2ok-storage. - Move Dzen media to
storage/dzen-mediausing explicit Compose bind mounts; do not use a symlink below the parentdatabind mount. - Move the inactive n8n
archivedirectory tostorage/n8n-archivewith a compatibility symlink. - Move Caddy logs last to
storage/caddy-logs, preserving Caddy's own rotation configuration. This requires a brief proxy restart.
Safety and verification
Each migration uses an online rsync, a short service stop where relevant, a
final rsync --delete, then source rename and symlink or Compose rebind. The
original source is retained as a timestamped rollback directory until file
counts, checksums/integrity checks, service health, and the mount target have
been verified. Directus backups are additionally gzip-tested. The original
directory is removed only after those checks pass and explicit cleanup is in
scope.
Exclusions
Do not move /var/lib/docker, Docker volumes, PostgreSQL, Redis, or
Meilisearch in this operation. These are latency-sensitive runtime data and
require a separate migration and rollback plan. Root, apt, and container
image caches are cleaned only through their own safe retention mechanisms;
they are not archived to the storage volume.
Expected result
The initial relocation moves roughly 11 GB from root storage: about 5.9 GB of
Directus dumps, 4.1 GB of bot media, 0.8 GB of inactive n8n archive, and
0.45 GB of Dzen media. Caddy logs add about 1.5 GB when moved. Sizes are
time-dependent and the final df result is authoritative.