Sign inSign up

untouchedwagons/simple-restore

By untouchedwagons

•Updated about 1 year ago

Simple Restore is the companion to the Simple Backup container.

Image
0

3.8K

untouchedwagons/simple-restore repository overview

⁠Simple Restore

Simple Restore is the companion to the Simple Backup container. It's more useful for Kubernetes setups as an initContainer with PersistantVolumeClaims which (usually) get deleted alongside the associated deployment; applying the deployment results in an empty volume for the service which isn't useful.

⁠Usage
⁠Docker
services:
  restore:
    image: untouchedwagons/simple-restore:latest
    container_name: restore
    restart: no
    environment:
      - BACKUP_BASE_NAME=Nginx # Required
      - BACKUP_APPEND_DIRECTORY=/some/sub/path # Optional
    volumes:
      - /path/to/data/source:/data
      - /path/to/backup/storage:/backups
⁠Kubernetes
initContainers:
- name: restore
    image: untouchedwagons/simple-restore:latest
    volumeMounts:
    - mountPath: /data
        name: Nginx-config
    - mountPath: /backups
        name: backups
    env:
    - name: BACKUP_BASE_NAME
        value: Nginx
    - name: BACKUP_APPEND_DIRECTORY
        value: /some/sub/path

When the container is finished restoring the latest backup it'll create a file called RESTORED in /data which it looks for on subsequent runs. If this file exists the restore process will abort so that it won't overwrite the volume with slightly old data. The backup container ignores this file so if the volume does get deleted the most recent backup will be restored as expected.

⁠Source

Github: https://github.com/UntouchedWagons/Simple-Restore⁠

Tag summary

Content type

Image

Digest

sha256:35189926b…

Size

26.9 MB

Last updated

about 1 year ago

docker pull untouchedwagons/simple-restore