Data registry¶
Migrate from an old server¶
Dependencies¶
- Tinyproxy
Update the allowed IP addresses in the
pillar/tinyproxy.sls
file.Deploy the
docs
service, when ready.
Update Salt and halt jobs¶
Check that
docker.uid
in the server’s Pillar file matches the entry in the/etc/passwd
file for thedocker.user
(deployer
).Change
cron.present
tocron.absent
in thesalt/registry/init.sls
file.Change
cron.present
tocron.absent
in thesalt/pelican/backend/init.sls
file.Comment out the
postgres.backup
section of the Pillar file.On the old server:
Delete the
/etc/cron.d/postgres_backups
file.docker compose down
all containers, except theweb
andstatic
containers of thedata-registry
service.
Check that no crawls are running at https://collect.data.open-contracting.org/jobs.
If a crawl is running, Django administrators can cancel jobs.
Check that no messages are enqueued at https://rabbitmq.data.open-contracting.org.
If a job is running in Kingfisher Process, job owners can cancel jobs.
Filesystem¶
Copy these directories from the old server to the new server, using rsync -avz
:
/data/storage/exporter
/data/storage/spoonbill
/home/collect/scrapyd/dbs
/home/collect/scrapyd/eggs
/home/collect/scrapyd/logs
Databases¶
Copy the
data_registry
andspoonbill
databases from the old server to the new server, using pg_dump.Copy the exchange_rates rows from the old server to the new server.
Docker apps¶
Perform the same tasks as for Data support.
Restore Salt and start jobs¶
Change
cron.absent
tocron.present
in thesalt/registry/init.sls
file.Change
cron.absent
tocron.present
in thesalt/pelican/backend/init.sls
file.Uncomment the
postgres.backup
section of the Pillar file.