Skip to main content

Simplest way to backup and restore git repositories

Project description

easy-mirrors

hooks tests

Simplest way to back up and restore git repositories.

Installation

Ensure that git is installed on your system.

Use the package manager pip to install easy-mirrors along with its command-line interface by running:

python3 -m pip install --user easy-mirrors

Basic usage

This program enables you to mirror your git repositories to a backup destination.

Warning: Ensure that git is correctly configured and that you have access to the repositories you intend to mirror before starting. This guarantees a smooth backup process and safeguards your valuable data.

Create a configuration file named easy_mirrors.ini in your home directory containing the following content:

[easy_mirrors]
path = /tmp/repositories
repositories =
  https://github.com/vladpunko/easy-mirrors.git

Use the following commands to mirror and restore your repository:

# Step -- 1.
easy-mirrors --period 30  # make mirrors every 30 minutes

# Step -- 2.
cd /tmp/repositories/easy-mirrors.git

# Step -- 3.
git push --mirror https://github.com/vladpunko/easy-mirrors.git

Contributing

Pull requests are welcome. Please open an issue first to discuss what should be changed.

Please make sure to update tests as appropriate.

# Step -- 1.
python3 -m venv .venv && source ./.venv/bin/activate && pip install pre-commit tox

# Step -- 2.
pre-commit install --config .githooks.yml

# Step -- 3.
tox && tox -e lint

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

easy_mirrors-0.3.3.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

easy_mirrors-0.3.3-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file easy_mirrors-0.3.3.tar.gz.

File metadata

  • Download URL: easy_mirrors-0.3.3.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for easy_mirrors-0.3.3.tar.gz
Algorithm Hash digest
SHA256 a53dca908d3a164b9eda9b78ca6a8411af3c17f914b6c4f25bcef219483eb34c
MD5 37f614c27b20c42a36e9bafd3474256b
BLAKE2b-256 49feae5992bae4756dc8cc1e2fa2aa0b7f234c872821e3825d38463aae352b8f

See more details on using hashes here.

File details

Details for the file easy_mirrors-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: easy_mirrors-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for easy_mirrors-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ed0215ee3fb21c8282134d315f20e695dca63d08f52ddb8a0d2b24fe170deb01
MD5 55906fc815a287136b9b91fa9b6b956c
BLAKE2b-256 3a124a6142792523b0701080d83a1dc97d01719317ceded16843a66c5ba59cdb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page