s4cp

module
v0.0.0-...-40598fc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 7, 2024 License: MIT

README

s4cp: SQLite to S3 copy

A lightweight Go util and Docker image to back up SQLite databases to S3. s4cp checks if the destination key exists and prevents overwriting backups.

Usage

export ACCESS_KEY_ID=<access key>
export SECRET_ACCESS_KEY=<secret key>
s4cp --endpoint-url <endpoint> --region <region> --bucket <bucket> <path> <key> 

Docker

docker run -v <volume>:/data --env-file <env file> ghcr.io/egor-s/s4cp:v2 /data/<path> <key>

strftime

key supports strftime syntax. For example, s4cp /data/data.db backups/%Y-%m-%d.db will substitute the current date.

Compressing backups

Optional flag --gz will compress the backup with gzip. .gz extension will be appended to the key automatically if needed.

Directories

Path Synopsis
cmd
s3

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL