# 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:
```bash
backupdirsm --upload /path/to/directory --include ".*/src/.*" --exclude ".*\.log$"
```
### Download Files
Download only *.conf files from the AWS Secrets Manager:
```bash
backupdirsm --download /path/to/directory --include ".*\.conf$"
```
Raw data
{
"_id": null,
"home_page": "https://github.com/ludenus/backupdirsm",
"name": "backupdirsm",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": "backup, aws, secrets, secrets-manager, restore",
"author": "Andrey Andreyev",
"author_email": "x0153362@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/b9/1c/8adb9ba1ff3f4ed325f887aaa040ce0b6ee3e449ad7483dc7996557d63c3/backupdirsm-0.0.4.tar.gz",
"platform": null,
"description": "# backupdirsm\n\nThis 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.\n\n## Features\n\n- **Upload directory**: Uploads all files within a specified directory to AWS Secrets Manager as secrets.\n- **Download directory**: Retrieves and writes secrets from AWS Secrets Manager to a specified directory.\n- **Pattern-based inclusion/exclusion**: Filters files for upload or download based on regular expressions.\n- **Metadata tags**: Attaches tags to each secret, such as the filename, hostname, and last modified timestamp.\n\n## Prerequisites\n\n- **Python 3.6+**: Ensure you have Python installed.\n- **AWS IAM permissions**: Ensure the user has permissions to use AWS Secrets Manager.\n\n## Installation\n```\npip install backupdirsm\n```\n\n\n## Usage\n```\nusage: backupdirsm [-h] (-u UPLOAD | -d DOWNLOAD) [-i REGEX] [-e REGEX]\n\nUpload or download directory contents to/from AWS Secrets Manager.\n\noptions:\n -h, --help show this help message and exit\n -u UPLOAD, --upload UPLOAD\n Source directory to upload to AWS Secrets Manager\n -d DOWNLOAD, --download DOWNLOAD\n Destination directory where to download from AWS Secrets Manager\n -i REGEX, --include REGEX\n Include only files matching the regex pattern\n -e REGEX, --exclude REGEX\n Exclude files matching the regex pattern\n```\n\n## Examples\n\n### Upload Files\n\nTo upload all src files in a directory to AWS Secrets Manager:\n\n```bash\nbackupdirsm --upload /path/to/directory --include \".*/src/.*\" --exclude \".*\\.log$\"\n```\n\n### Download Files\nDownload only *.conf files from the AWS Secrets Manager:\n```bash\nbackupdirsm --download /path/to/directory --include \".*\\.conf$\"\n```\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": null,
"version": "0.0.4",
"project_urls": {
"Documentation": "https://github.com/ludenus/backupdirsm",
"Homepage": "https://github.com/ludenus/backupdirsm",
"Repository": "https://github.com/ludenus/backupdirsm"
},
"split_keywords": [
"backup",
" aws",
" secrets",
" secrets-manager",
" restore"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d8aa221bca43f01556aab8945c5cb3174dd2260b72495475d6a0e640d6c46f49",
"md5": "78a3bd81f297960132e574a9cf471c5a",
"sha256": "fce426aa53fbd63663fd2d0485f9cdf981a2aa288dcd11d8441fc35b9665b5b6"
},
"downloads": -1,
"filename": "backupdirsm-0.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "78a3bd81f297960132e574a9cf471c5a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 5502,
"upload_time": "2024-10-30T15:40:02",
"upload_time_iso_8601": "2024-10-30T15:40:02.402440Z",
"url": "https://files.pythonhosted.org/packages/d8/aa/221bca43f01556aab8945c5cb3174dd2260b72495475d6a0e640d6c46f49/backupdirsm-0.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b91c8adb9ba1ff3f4ed325f887aaa040ce0b6ee3e449ad7483dc7996557d63c3",
"md5": "354cbad16c77cb86711010a3d91751a9",
"sha256": "189ab181061bc304a6785d65765b6ab997d0fd3dcb9324a2de79b38ba0bed4b5"
},
"downloads": -1,
"filename": "backupdirsm-0.0.4.tar.gz",
"has_sig": false,
"md5_digest": "354cbad16c77cb86711010a3d91751a9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 4667,
"upload_time": "2024-10-30T15:40:04",
"upload_time_iso_8601": "2024-10-30T15:40:04.493047Z",
"url": "https://files.pythonhosted.org/packages/b9/1c/8adb9ba1ff3f4ed325f887aaa040ce0b6ee3e449ad7483dc7996557d63c3/backupdirsm-0.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-30 15:40:04",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ludenus",
"github_project": "backupdirsm",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "backupdirsm"
}