Skip to content

GitFlic Data Migration

Overview

After installing GitFlic on a new server, you need to migrate the following data:

  • PostgreSQL gitflic database
  • Static file directories (see directory list). Note that your server paths may differ - check actual paths in application.properties.
  • Redis database containing: webhooks, tokens, email notification addresses, and Telegram notification data.

Docker Data Migration

If you deployed GitFlic using Docker (setup guide), migrate these files:

│
│# If you modified application.properties, recreate it during migration as new versions may introduce new parameters.
│# Note: application.properties is copied into the image - use --build parameter to update it.
│
├── default-config
│   └── application.properties
├── docker-compose.yml
│
│# If you modified ENV file, recreate it during migration as new versions may introduce new parameters.
│
├── ENV
├── gitflic
│   │
│   │  # Migrate data directory
│   │
│   ├── data
│   │   ├── cert
│   │   │   └── key.pem
│   │   ├── cicd
│   │   ├── img
│   │   ├── log
│   │   ├── registry
│   │   ├── releases
│   │   └── repo
│   └── Dockerfile
├── postgres
│   │
│   │# Migrate data directory
│   │
│   ├── data 
│   ├── Dockerfile
│   └── pgcrypto.sh
│
│# Migrate redis directory
│
└── redis
    └── data

Migration Steps

  1. PostgreSQL Database:
  2. Dump database: pg_dump gitflic > gitflic_backup.sql
  3. Restore on new server: psql gitflic < gitflic_backup.sql

  4. Redis Database:

  5. Backup: redis-cli SAVE (copies dump.rdb from Redis data directory)
  6. Transfer dump.rdb to new server's Redis data directory

  7. Static Files:

  8. Copy all directories listed in application.properties maintaining permissions

  9. Docker Deployment:

  10. Recreate modified configuration files (application.properties, ENV)
  11. Transfer data volumes (gitflic/data, postgres/data, redis/data)

Recommendation

Perform migration during maintenance window and verify all data integrity after migration.

Automatic translation!

This page has been automatically translated. The text may contain inaccuracies.