Giter VIP home page Giter VIP logo

salvage's Introduction

Salvage

License latest version Docker Image Size (tag)

A docker container utility to schedule archiving container volumes.

Usage

Volumes mounted to a directory under /data will be archived to the volume mounted at /archive inside the Salvage container. Directories are added to a tarball based on the archive strategy and are then compressed with the selected archive compression type. Each archive is timestamped based on when the archive process started running, meaning all archives created during the same job run will have the same timestamp ni their filename. Timestamps are created in the format [year]-[month]-[day]_[hour]-[minute]-[second].

Examples

Docker

docker run -d \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v /path/to/archive/directory:/archive \
  -v my-app-volume:/data/app \
  --name salvage \
  --restart=always \
  kwheelans/salvage:latest

Docker Compose

version: "3.8"
services:
  salvage:
    container_name: salvage
    image: kwheelans/salvage:latest
    restart: unless-stopped
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /path/to/archive/directory:/archive
      - my-app-volume:/data/app

volumes:
  my-app-volume:
    external: true

Environment Variables

Variable Default Description
SCHEDULE 0 0 * * * Standard cron expression.
See https://en.wikipedia.org/wiki/Cron.
TZ UTC Provide TZ identifier to use in the container (ie America/Phoenix). See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones.
SALVAGE_ARCHIVE_COMPRESSION gzip Compression used on the tarball archive.
Valid values bzip2, gzip, xz, zstd.
SALVAGE_ARCHIVE_COMPRESSION_LEVEL 6 Set the compression level to be used by the selected archive compression.
SALVAGE_ARCHIVE_STRATEGY multiple multiple - Compress each directory into is own archive.
single - Compress all directories into one archive.
SALVAGE_ARCHIVE_PREFIX salvage Provide the prefix to be used when creating the backup archives.
SALVAGE_ARCHIVE_GROUP_PERMISSION read Provide how the group permission should be set for the backup archive.
Valid values read, read-write, none.
SALVAGE_ARCHIVE_OTHER_PERMISSION read Provide how the other permission should be set for the backup archive.
Valid values read, read-write, none.
SALVAGE_CONTAINER_MANAGEMENT true Controls if containers should be stopped while their volumes are being backed up.
SALVAGE_RUN_ONCE false When set to true salvage will only run once and exit and not on a schedule.

Container Registries

Container Registry Image
Docker Hub kwheelans/salvage
GitHub Container Registry ghcr.io/kwheelans/salvage

salvage's People

Contributors

kwheelans avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.