Skip to content

You're reading the docs for v1.0, an older version. Read the latest docs

Getting startedInstallation

Installation

Install s3mirror with Homebrew, run the container image from GHCR, or run the script from a checkout.

s3mirror is one Python script. It needs Python 3.11 or newer and three packages: boto3, urllib3 and PyYAML. Every release is published as a Homebrew formula and a multi-arch container image, from the same tag.

The easiest route on macOS and Linux:

brew tap netspeedy/s3mirror
brew install s3mirror

The formula installs the script and its packages into their own virtual environment on Homebrew’s Python, and puts an s3mirror command on your path. To upgrade:

brew upgrade s3mirror

Releases are published to GHCR for linux/amd64 and linux/arm64:

docker pull ghcr.io/netspeedy/s3mirror:v1.0.4

The image’s entrypoint is s3mirror itself, so arguments after the image name are s3mirror’s flags, and with none it prints its help. You mount the config file into the container; Container covers the tags, mounts and the user it runs as.

Clone the repository and install the three packages into a virtual environment:

git clone https://github.com/netspeedy/s3mirror.git
cd s3mirror
python3 -m venv .venv
. .venv/bin/activate
python -m pip install -r requirements.txt

From a checkout the command is python3 s3mirror.py rather than s3mirror, with the same flags:

python3 s3mirror.py --config config.yaml --show-config

requirements.txt doesn’t pin versions, so this installs the newest boto3, urllib3 and PyYAML. To upgrade, pull and run the pip install again in the same virtual environment.

s3mirror --version
Output
S3 Mirror v1.0.4