Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Backup mongodb data by copy dbpath
.. image:: https://pypip.in/download/mongodb-backup/badge.svg :target: https://pypi.python.org/pypi/mongodb-backup/ :alt: Downloads
.. code-block:: bash
$ pip install mongodb-backup
Start a mongod instance on port 27017
.
Run py.test test.py
.
.. code-block:: bash
$ mongodbbackup --help
Make sure which mongod
instance you want to backup, and run
mongodbbackup
on that server.
Example ^^^^^^^
Backup a standalone mongod instance.
.. code-block:: bash
$ mongodbbackup -p --primary-ok <backup_dir>
Caution: it will block all writes.
Backup a replication, run the follow command on a secondary server.
.. code-block:: bash
$ mongodbbackup -p <secondary_port> <backup_dir>
Backup a cluster, backup a config server and each shard. If you have two shards, you need to run the follow command three times.
.. code-block:: bash
$ mongodbbackup --ms-url <mongos_url> -p <backup_dir>
This tool backup mongodb by copying dbpath, so it must run on the same machine with the mongod instance.
If you want to backup a mongodb cluster, you should specify --ms-url
option. It will stop balancer before backup, and restart balancer after backup.
Caution: This tool doesn't make a point-in-time backup, it just copy the data directory, you can copy back the data to restore if any disaster happens.
FAQs
A tool to backup mongodb
We found that mongodb-backup demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.