Skip to main content

coldsync

Build Status Coverage Status PyPI version License Downloads

Python 3.4 Python 3.5 Python 3.6 Python 3.7 Python 3.8 Pypy 3.5

Backup important files to cold storage.

pip install coldsync

Google Cloud Storage is supported for now. The API is can be extend to add support other providers. Inside the storage module extend the BaseStorage to add support for other providers.

Usage

To use the commands you must first setup the following environment variables:

  • CS_DATA_CENTER
  • CS_PROJECT_NAME
  • CS_ENV_NAME
  • CS_GOOGLE_SERVICE_ACCOUNT_PATH

Where CS_DATA_CENTER, CS_PROJECT_NAME, CS_ENV_NAME are used to identify the bucket in which files are stored.

The CS_GOOGLE_SERVICE_ACCOUNT_PATH must point to your google credentials.json file.

Examples

Show all files inside the bucket

CS_DATA_CENTER='central-europe' \
CS_PROJECT_NAME='coold-data-storage' \
CS_ENV_NAME='production' \
CS_GOOGLE_SERVICE_ACCOUNT_PATH='credentials.json' \
coldsync list-files

Upload a file to the bucket

You may need to mount the file in the docker container in order to have access to it.

CS_DATA_CENTER='central-europe' \
CS_PROJECT_NAME='coold-data-storage' \
CS_ENV_NAME='production' \
CS_GOOGLE_SERVICE_ACCOUNT_PATH='credentials.json' \
coldsync upload-file sample.jpg --remote_path 'thecat.jpg'

Download a file from the bucket

You may need to mount the download directory in the docker container in order to have access to the files which have been downloaded from your local file system.

CS_DATA_CENTER='central-europe' \
CS_PROJECT_NAME='coold-data-storage' \
CS_ENV_NAME='production' \
CS_GOOGLE_SERVICE_ACCOUNT_PATH='credentials.json' \
coldsync download-file 'thecat.jpg' thecat.jpg

Deleting a file from the bucket

CS_DATA_CENTER='central-europe' \
CS_PROJECT_NAME='coold-data-storage' \
CS_ENV_NAME='production' \
CS_GOOGLE_SERVICE_ACCOUNT_PATH='credentials.json' \
coldsync delete-file 'thecat.jpg'

Tests

Running test suite

python setup.py test

Metadata

Release files for coldsync 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for coldsync 0.0.4
File Size Uploaded Provenance Actions
coldsync-0.0.4.tar.gz 4.8 kB Without provenance Details for coldsync-0.0.4.tar.gz

Release files / coldsync-0.0.4.tar.gz

Download URL coldsync-0.0.4.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0ec8205c1c074cfa9ac6fc02d0bd0d478edd42ca45238db1652c216012007467
BLAKE2b-256 checksum
How to use checksums
e672268ed703f004c664098633f77607b8597d12d0b8833a03a2313286b3d953
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.5.2

Security for coldsync 0.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page