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.7.tar.gz
(5.0 kB
view details)
Built Distribution
File details
Details for the file backupdirsm-0.0.7.tar.gz
.
File metadata
- Download URL: backupdirsm-0.0.7.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 958bdc689955b32ef29030531f051251d2590d6f829bfcabe03538cd53e9003d |
|
MD5 | 8f6a0a465f143bfac20b215207b1d835 |
|
BLAKE2b-256 | ed6964f6af8dc45536cb7dd8bd29ed013da974e5cdb68b04235493b577e85c42 |
File details
Details for the file backupdirsm-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: backupdirsm-0.0.7-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1de73e87b4882e1479d1e7091ab1928db7861fe64f9f66ccb1ae4d9428d08f7f |
|
MD5 | 3abe19c22b642908547c9f3528f4e570 |
|
BLAKE2b-256 | 39b73bf2ff3c69c97b703c99485dce4218c0b2e3aa80ed05ba10492159cc4eed |