Skip to main content

No project description provided

Project description

backupdirsm

This Python script uploads or downloads the contents of a specified directory to/from AWS Secrets Manager. It provides a secure way to store or retrieve sensitive data from a directory using AWS Secrets Manager.

Features

  • Upload directory: Uploads all files within a specified directory to AWS Secrets Manager as secrets.
  • Download directory: Retrieves and writes secrets from AWS Secrets Manager to a specified directory.
  • Pattern-based inclusion/exclusion: Filters files for upload or download based on regular expressions.
  • Metadata tags: Attaches tags to each secret, such as the filename, hostname, and last modified timestamp.

Prerequisites

  • Python 3.6+: Ensure you have Python installed.
  • AWS IAM permissions: Ensure the user has permissions to use AWS Secrets Manager.

Installation

pip install backupdirsm

Usage

usage: backupdirsm [-h] (-u UPLOAD | -d DOWNLOAD) [-i REGEX] [-e REGEX]

Upload or download directory contents to/from AWS Secrets Manager.

options:
  -h, --help            show this help message and exit
  -u UPLOAD, --upload UPLOAD
                        Source directory to upload to AWS Secrets Manager
  -d DOWNLOAD, --download DOWNLOAD
                        Destination directory where to download from AWS Secrets Manager
  -i REGEX, --include REGEX
                        Include only files matching the regex pattern
  -e REGEX, --exclude REGEX
                        Exclude files matching the regex pattern

Examples

Upload Files

To upload all src files in a directory to AWS Secrets Manager:

backupdirsm --upload /path/to/directory --include ".*/src/.*" --exclude ".*\.log$"

Download Files

Download only *.conf files from the AWS Secrets Manager:

backupdirsm --download /path/to/directory --include ".*\.conf$"

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

backupdirsm-0.0.6.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

backupdirsm-0.0.6-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file backupdirsm-0.0.6.tar.gz.

File metadata

  • Download URL: backupdirsm-0.0.6.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for backupdirsm-0.0.6.tar.gz
Algorithm Hash digest
SHA256 ed42a3ab97e8d286a874ec9d45a611f321a3e3a72d6192d14f0509db10a65baf
MD5 88880c9d801554eeee5bc9892259e01f
BLAKE2b-256 dfcfabdbab1ed1ddb71e0412deb477e4d3209dc8ed6e74bdb58d952314f48e79

See more details on using hashes here.

File details

Details for the file backupdirsm-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: backupdirsm-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for backupdirsm-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 a0b76928be42950d34ed3ece6c0d7232f5897fa1c6e2b3a622e7b7f7d08bdff2
MD5 33d463cd772b9af7e664d80510273805
BLAKE2b-256 756de03422f14c33a4d1f01831609d8e12d7f37dcee4ebc806247b313986886b

See more details on using hashes here.

Supported by

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