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.
Homebrew
Section titled “Homebrew”The easiest route on macOS and Linux:
brew tap netspeedy/s3mirrorbrew install s3mirrorThe 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 s3mirrorContainer image
Section titled “Container image”Releases are published to GHCR
for linux/amd64 and linux/arm64:
docker pull ghcr.io/netspeedy/s3mirror:v1.1.0The 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.
From a checkout
Section titled “From a checkout”Clone the repository and install the three packages into a virtual environment:
git clone https://github.com/netspeedy/s3mirror.gitcd s3mirrorpython3 -m venv .venv. .venv/bin/activatepython -m pip install -r requirements.txtFrom a checkout the command is python3 s3mirror.py rather than s3mirror, with the same flags:
python3 s3mirror.py --config config.yaml --show-configrequirements.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.
Check the version
Section titled “Check the version”s3mirror --versionS3 Mirror v1.1.0