https://github.com/ai4os/ai4os-cvat-backups

sidecar for making backups of CVAT

https://github.com/ai4os/ai4os-cvat-backups

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.2%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

sidecar for making backups of CVAT

Basic Info
  • Host: GitHub
  • Owner: ai4os
  • Language: Python
  • Default Branch: master
  • Size: 20.5 KB
Statistics
  • Stars: 0
  • Watchers: 4
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created about 1 year ago · Last pushed about 1 year ago

https://github.com/ai4os/ai4os-cvat-backups/blob/master/

# ai4os-cvat-backups

[![Build image](https://github.com/ai4os/ai4os-cvat-backups/actions/workflows/ai4os-docker.yml/badge.svg)](https://github.com/ai4os/ai4os-cvat-backups/actions/workflows/ai4os-docker.yml)

Implementation for automated backup creation of CVAT projects and annotations using CVAT API.

## components

### backup.py
Python script for creating the backups.

#### Arguments
`--mode [p|a]`

* `p` to back up projects
* `a` to backup annotations

Additional configuration is set by ENV variables:

| ENV variable   | description |
|:----------|:------------|
| `LOG_LEVEL` | debug level; i.e. DEBUG, ERROR, INFO or WARN |
| `CVAT_URL` | full URL to the CVAT instance; e.g., https://0f8d6ec6-2e90-11f0-b9c9-0242ac120004.ifca-deployments.cloud.ai4eosc.eu |
| `CVAT_USERNAME` | CVAT user on whose behalf is the API for creating backups called; preferrably a superuser to be able to backup all the projects |
| `CVAT_PASSWORD` | CVAT user's password |
| `CVAT_BACKUP_DIR` | directory where to store the backup files; e.g., '/cvat-backups' |
| `CVAT_BACKUP_SAVE_IMAGES` | `'true'` or `'false'`, whether to store images along with annotations (when using `backup.py --mode a` |
| `CVAT_BACKUP_REQUEST_TIMEOUT_HOURS` | maximum time in hours to wait for CVAT to prepare a backup |

### sweeper.py
Python script for cleaning old backups according to `${CVAT_BACKUP_TTL}` and `${CVAT_MIN_NUM_BACKUPS}` settings.

Additional configuration is set by ENV variables:

| ENV variable   | description |
|:----------|:------------|
| `LOG_LEVEL` | debug level; i.e. DEBUG, ERROR, INFO or WARN |
| `CVAT_BACKUP_DIR` | directory where to store the backup files; e.g., '/cvat-backups' |
| `CVAT_BACKUP_TTL` | minimum age of backup file in hours; if the age of the backup file exceeds this value and there are more than `${CVAT_MIN_NUM_BACKUPS}` backup files, this backup is deleted by the sweeper |
| `CVAT_MIN_NUM_BACKUPS` | minimum number of backup files to keep regardless of their age (`${CVAT_BACKUP_TTL}`) |

## backup settings
The frequency of the backups can be adjusted in the [crontab](crontab) file.

## running locally

### backup.py wrapper
`$ run-locally-backup.sh`

### sweeper.py wrapper
`$ run-locally-sweeper.sh`

## running with docker compose

### additional ENV variables for docker compose

| ENV variable   | description |
|:----------|:------------|
| `LOG_LEVEL` | debug level; i.e. DEBUG, ERROR, INFO or WARN |
| `VERSION` | docker image version |
| `PYTHON_VERSION` | e.g., `'3.9.19'`; python version |
| `NAME` | name of the docker compose project |
| `DOCKER_NAMESPACE` | suffix used in container names |

1. edit the `.env` file and `crontab`
1. `$ docker compose --env-file .env up --build -d`

Owner

  • Name: AI4OS
  • Login: ai4os
  • Kind: organization
  • Email: ai4eosc-po@listas.csic.es

AI4OS is the software powering the AI4EOSC platform

GitHub Events

Total
  • Delete event: 1
  • Push event: 10
  • Create event: 3
Last Year
  • Delete event: 1
  • Push event: 10
  • Create event: 3

Dependencies

.github/workflows/ai4os-docker.yml actions
  • actions/checkout v3 composite
  • cardinalby/export-env-action v2 composite
  • docker/build-push-action v5 composite
  • docker/login-action v2 composite
  • docker/setup-buildx-action v2 composite
Dockerfile docker
  • python ${PYTHON_VERSION}-slim build
docker-compose.yml docker
  • ai4os-cvat-backups ${VERSION
requirements.txt pypi
  • cvat-sdk *