View Code? Open in Web Editor
NEW
A database backup and management tool with four main actions: backup, restore, delete, and clone.
License: MIT License
mongodb-backup-manager's People
Contributors
Watchers
mongodb-backup-manager's Issues
Accept an optional flag to specify an AWS S3 Bucket and AWS credentials to upload the backup file.
If an AWS S3 Bucket is specified, upload the backup file to the bucket using the provided AWS credentials.
Accept an optional backup file name as an argument (default value mongodb_archive.gz).
Accept an optional flag to disable decompression during the restore process.
Accept an optional flag to drop the collection if it already exists.
If the drop collection flag is set, set it to drop each collection before restoring them.
Accept an optional flag to specify an SFTP URI and SFTP credentials to upload the backup file.
If an SFTP URI is specified, upload the backup file to the URI using the provided SFTP credentials.
Create a function to handle the backup action.
Accept the database target URI as a required argument.
Connect to the database using the provided target URI.
Save it as an archive (default name: mongodb_archive)
Create a database backup and save it with the provided backup file name.
Compress the backup file if compression is not disabled.
Accept an optional flag to specify an AWS S3 Bucket and AWS credentials to download the backup file.
If an AWS S3 Bucket is specified, download the backup file from the bucket using the provided AWS credentials.
Accept an optional backup file name as an argument with a default value of the current date and time UTC (YYYYMMDD_hhmmss).
2. Example of the file name: 20231231_235959_mongodb.gz
Accept an optional flag to disable compression during the backup process.
App features:
The app should be available in two forms:
CLI (Command Line Interface) for Windows, Linux, and MacOS.
API version available in Docker.
The app should accept input in the form of an action and corresponding options .
Available Actions:
backup : The backup action should support the following options :
database target URI
[backup file name] (optional)
[disable compression] (optional)
[AWS S3 Bucket, AWS Credentials] (optional)
[SFTP URI, SFTP Credentials] (optional)
restore : The restore action should support the following options :
database target URI
[backup file name] (optional)
[disable decompression] (optional)
[drop collection if exist] (optional)
delete : The delete action should support the following options :
database target URI
[create a backup before deletion] (optional)
clone : The clone action should support the following options :
database target URI
(database source URI OR database backup file name)
These actions and options should be clearly defined and explained in the documentation for the app, along with any necessary syntax and examples.
Create a function to handle the restore action.
Accept the database target URI as a required argument.
Connect to the database using the provided target URI.
Find the backup file with the provided backup file name (the default name is mongodb_archive.gz).
Decompress the backup file (GZIP) if decompression is not disabled (it should be enabled by default).
Restore the database from the backup file.
Create a function to handle the backup action.
Accept the database target URI as a required argument.
Accept an optional backup file name as an argument with a default value of the current date and time.
Accept an optional flag to disable compression during the backup process.
Accept an optional flag to specify an AWS S3 Bucket and AWS credentials to upload the backup file.
Accept an optional flag to specify an SFTP URI and SFTP credentials to upload the backup file.
Connect to the database using the provided target URI.
Create a backup of the database and save it with the provided backup file name.
Compress the backup file if compression is not disabled.
If an AWS S3 Bucket is specified, upload the backup file to the bucket using the provided AWS credentials.
If an SFTP URI is specified, upload the backup file to the URI using the provided SFTP credentials.
Accept an optional flag to specify an SFTP URI and SFTP credentials to download the backup file.
If an SFTP URI is specified, download the backup file from the URI using the provided SFTP credentials.
The SFTP URI should have an SFTP endpoint and the server path to the file.