Skip to content

Backup ​

The CertGuardian Docker files are usually located in the home directory of the root user or user that manages CertGuardian

For example:

bash
/home/<user>/certguardian-docker-images

You can check the current user's home directory with:

bash
echo $HOME

The CertGuardian folder is usually named certguardian-docker-images.

Before creating the backup, make sure you are working with the correct CertGuardian installation directory.

Check CertGuardian and Backoffice Versions ​

Before creating the backup, record the currently deployed CertGuardian and Backoffice versions:

printf 'Certguardian version: %s\n' "$(docker inspect --format '{{ index .Config.Labels "certguardian.version" }}' gitea.entorno.es:3000/certguardian/certguardian:latest)" > certguardian_version
printf 'Backoffice version: %s\n' "$(docker inspect --format '{{ index .Config.Labels "certguardian.backoffice.version" }}' gitea.entorno.es:3000/certguardian/certguardian-backoffice:latest)" >> certguardian_version
docker image inspect redis:alpine   --format '{{range .Config.Env}}{{if eq (index (split . "=") 0) "REDIS_VERSION"}}{{println .}}{{end}}{{end}}' >> certguardian_version

This creates a certguardian_version file containing the versions of both components.

Certguardian version: v0.12.4
Backoffice version: v0.6.3
REDIS_VERSION=8.10.2

Backup folder ​

After recording the versions, back up the certguardian-docker-images to the designated backup location. Example:

bash
tar -czf "certguardian-docker-images_$(date +%Y%m%d_%H%M).zip" ./certguardian-docker-images
cp "certguardian-docker-images_$(date +%Y%m%d_%H%M).zip" /backup/destination

Restore ​

To restore CertGuardian, follow the steps below.

Stop the existing CertGuardian containers ​

Navigate to the original CertGuardian folder and run:

bash
docker compose down

Restore the CertGuardian folder ​

Restore the CertGuardian folder from your backup.

bash
tar -xzf certguardian-docker-images.zip -C ./certguardian-docker-images_restored

Once the folder has been restored, navigate to the restored directory.

Check the CertGuardian version ​

If you want to restore to the exact version of CertGuardian included in the backup, check the version stored in the certguardian_version file:

bash
cat certguardian_version

Take note of the version number returned by this command.

Update the Docker image versions ​

Open the docker-compose.yml file and locate the backoffice and certguardian services.

yml
  backoffice:
    restart: unless-stopped
    image: gitea.entorno.es:3000/certguardian/certguardian-backoffice:latest
    container_name: certguardian_backoffice
    volumes:
      - ./backoffice/config.js:/usr/share/nginx/html/config.js
    depends_on:
      - certguardian
  certguardian:
    image: gitea.entorno.es:3000/certguardian/certguardian:latest
    volumes:
      - ./backend/logs:/var/www/certguardian/storage/logs
      - ./backend/certificates:/certguardian/certificates
      - ./backend/data/:/data
      - ./backend/.ssh:/var/www/certguardian/ssh-keys
    container_name: certguardian_backend
    restart: unless-stopped

Replace latest with the version obtained from the certguardian_version file.

Pull the required Docker images ​

Run:

bash
docker compose pull

This downloads the specified versions of the CertGuardian images.

Recreate the containers ​

The run:

bash
docker compose up --force-recreate

Check the logs ​

To see the logs, run:

bash
docker compose logs

If CertGuardian has started successfully, you should see log entries similar to:

log
certguardian-1  | ### Running all services ###
certguardian-1  | 2026-09-29 09:14:19,053 INFO supervisord started with pid 1
certguardian-1  | 2026-09-29 09:14:20,054 INFO spawned: 'apache2' with pid 149
certguardian-1  | 2026-09-29 09:14:20,057 INFO spawned: 'reverb' with pid 150
certguardian-1  | 2026-09-29 09:14:20,058 INFO spawned: 'scheduler' with pid 151
certguardian-1  | 2026-09-29 09:14:20,059 INFO spawned: 'worker' with pid 152
certguardian-1  | 2026-09-29 09:14:21,344 INFO success: apache2 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
certguardian-1  | 2026-09-29 09:14:21,344 INFO success: reverb entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
certguardian-1  | 2026-09-29 09:14:21,344 INFO success: scheduler entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
certguardian-1  | 2026-09-29 09:14:21,344 INFO success: worker entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

CertGuardian is an SSL/TLS lifecycle automation tool developed and supported by Entorno Digital.