{ "info": { "author": "Rafa Munoz", "author_email": "rafa93m@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Topic :: Database", "Topic :: Software Development :: Build Tools", "Topic :: System :: Archiving :: Backup" ], "description": "\ufeff# PyMongoBack\n\n**PyMongo** Back is a simple Python library designed to help you create MongoDB Backups from both local and remote servers.\n\n\n## Install\n\nYou can easily install it using the following command:\n\n sudo pip3 install pymongoback\n\n> In the server that is going to execute the script, it will be necessary to have installed **MongoDB** or **Mongodb Tools**. Since you need to have installed mongodump.\n\n## Usage\n\nStarting to use PyMongoBack is very simple. You only need to import the library and create an object PyMongoBackup() with the parameters that you prefer.\n\n|Param|Type|Description|\n|--|--|--|\n|username|str|Username for login MongoDB. Default None.|\n|password|str|Password for login MongoDB. Default None.|\n|host|str|IP address of the MongoDB server. Default 'localhost'.|\n|days_backup|int|Maximum days that are saved backup. Default None (always save).|\n|path_backup|str|Path where the backup is saved. Default './BackupMongo'.|\n|log|bool|Indicates if the output is written to a log file. Default False.|\n|path_log|str|Path where the log is saved. Default './BackupMongo/log'.|\n|prefix|str|Indicates the prefix with which the backup will be saved. Default 'back_'.|\n|datetime_format|str|Indicates the date format to name the backup. Default '%Y-%m-%d_%H-%M'.|\n\n> Example of name backup file: back_2019-03-09_12-21.zip\n\n|Methods|Description|Arguments|\n|--|--|--|\n|create_full_backup()|Create a backup of all databases||\n|create_backup('db1')|Create a backup of a database|Name of database|\n|create_multidb_backup(['db1','db2'])|Create a backup of several databases|List with the databases to make the backup|\n\n\n### Examples\n\nBackup of all databases on the local server.\n \n import pymongoback\n \n back = pymongoback.PyMongoBackup() \n back.create_full_backup()\n\nBackup of a database on the remote server and changing the prefix.\n\n import pymongoback \n \n backone = pymongoback.PyMongoBackup(username='Rafa', password='pass1234',host='192.168.1.221', days_backup=5, prefix='backremote_') \n backone.create_backup('db1')\n\nBackup of two databases by changing the path where they are saved and log file activated.\n\n import pymongoback \n \n backmulti = pymongoback.PyMongoBackup(username='Rafa', password='pass1234', path_backup=\"/var/BackupMongo\", log=True, path_log='/var/log/BackupMongo/log', prefix='multiback_')\n \n databases = ['db1','db2']\n backmulti.create_multidb_backup(databases)\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/RafaMunoz/PyMongoBack", "keywords": "tools sysadmin backup mongodb mongodump", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pymongoback", "package_url": "https://pypi.org/project/pymongoback/", "platform": "", "project_url": "https://pypi.org/project/pymongoback/", "project_urls": { "Homepage": "https://github.com/RafaMunoz/PyMongoBack" }, "release_url": "https://pypi.org/project/pymongoback/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "PyMongo Back is a simple Python library designed to help you create MongoDB Backups from both local and remote servers.", "version": "1.0.0" }, "last_serial": 4918897, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "82cd0b2137c58ee890ed7612cf1f5866", "sha256": "470f7b8240ba601fe3124604d9c79914769a89a58b132a8dec86fe0cfabfeb9b" }, "downloads": -1, "filename": "pymongoback-1.0.0.tar.gz", "has_sig": false, "md5_digest": "82cd0b2137c58ee890ed7612cf1f5866", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5759, "upload_time": "2019-03-09T15:08:12", "url": "https://files.pythonhosted.org/packages/dc/95/d59ca7a3b3dd736546262ae859c154b0c1f1498a33fc29c60f8a5a1f356e/pymongoback-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "82cd0b2137c58ee890ed7612cf1f5866", "sha256": "470f7b8240ba601fe3124604d9c79914769a89a58b132a8dec86fe0cfabfeb9b" }, "downloads": -1, "filename": "pymongoback-1.0.0.tar.gz", "has_sig": false, "md5_digest": "82cd0b2137c58ee890ed7612cf1f5866", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5759, "upload_time": "2019-03-09T15:08:12", "url": "https://files.pythonhosted.org/packages/dc/95/d59ca7a3b3dd736546262ae859c154b0c1f1498a33fc29c60f8a5a1f356e/pymongoback-1.0.0.tar.gz" } ] }