mongo-backup | small script to make daily backups | Continuous Backup library

 by   nikmartin Shell Version: Current License: MIT

kandi X-RAY | mongo-backup Summary

kandi X-RAY | mongo-backup Summary

mongo-backup is a Shell library typically used in Backup Recovery, Continuous Backup, Nodejs, MongoDB applications. mongo-backup has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

A small script to make daily backups of a MongoDB database, and moves them to Google Cloud Storage
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              mongo-backup has a low active ecosystem.
              It has 5 star(s) with 1 fork(s). There are 1 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              mongo-backup has no issues reported. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of mongo-backup is current.

            kandi-Quality Quality

              mongo-backup has no bugs reported.

            kandi-Security Security

              mongo-backup has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              mongo-backup is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              mongo-backup releases are not available. You will need to build from source code and install.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of mongo-backup
            Get all kandi verified functions for this library.

            mongo-backup Key Features

            No Key Features are available at this moment for mongo-backup.

            mongo-backup Examples and Code Snippets

            No Code Snippets are available at this moment for mongo-backup.

            Community Discussions

            QUESTION

            linux "find rm" command also remove the root directory
            Asked 2020-May-14 at 11:02

            I am trying to remove all directories inside /mongo-backups directory which last modified 10 minute ago. but as I run the command it also remove the /mongo-backups directory

            ...

            ANSWER

            Answered 2020-May-14 at 09:09

            You can use -mindepth 1 to exclude the current directory:

            Source https://stackoverflow.com/questions/61792822

            QUESTION

            Trying to read BSON file, get bson.errors.InvalidBSON: objsize too large
            Asked 2019-May-02 at 14:30

            I am currently trying to read a bson file to import it into a database. I can already read the file and print it as as bytes, but I end up just getting an bson.errors.InvalidBSON: objsize too large error.

            This is the code that is trying to decode the file

            ...

            ANSWER

            Answered 2018-Nov-28 at 20:49
            print(content)
            
            b'[{"_id": {"$oid": "5bf3cf511c9d44000088c376"}, "some": "sort of"}, {"_id": {"$oid": "5bf3cf5c1c9d44000088c377"}, "test": "data"}]'
            

            Source https://stackoverflow.com/questions/53496858

            QUESTION

            MongoDB backup -> tar -> gz -> gpg
            Asked 2017-Jul-05 at 20:48

            I have a MongoDB server and I am using mongodump command to create backup. I run command mongodump --out ./mongo-backup then tar -czf ./mongo-backup.tar.gz ./mongo-backup then gpg --encrypt ./mongo-backup.tar.gz > ./mongo-backup.tar.gz.gpg and send this file to backup server.

            My MongoDB database has 20GB with MongoDB show dbs command, MongoDB mongodump backup directory has only 3.8GB, MongoDB gzipped-tarball has only 118MB and my gpg file has only 119MB in size.

            How is this possible to reduce 20GB database to 119MB file? Is it fault tolerant?

            I tried to create new server ( clone of production ), enabled firewall to ensure that noone could connect and run this backup procedure. I create fresh new server and import data and there are some differences:

            I ran same command from mongo shell use db1; db.db1_collection1.count(); and use db2; db.db2_collection1.count(); and results are:

            • 807843 vs. 807831 ( db1.collection1 source server vs. db1.collection1 restored server )
            • 3044401 vs. 3044284 ( db2.collection1 source server vs. db2.collection1 restored server )
            ...

            ANSWER

            Answered 2017-Jul-05 at 20:48

            If you have validated the counts and size of documents/collections in your restored data, this scenario is possible although atypical in the ratios described.

            My MongoDB database has 20GB with MongoDB show dbs command

            This shows you the size of files on disk, including preallocated space that exists from deletion of previous data. Preallocated space is available for reuse, but some MongoDB storage engines are more efficient than others.

            MongoDB mongodumpbackup directory has only 3.8GB

            The mongodump tool (as at v3.2.11, which you mention using) exports an uncompressed copy of your data unless you specify the --gzip option. This total should represent your actual data size but does not include storage used for indexes. The index definitions are exported by mongodump and the indexes will be rebuilt when the dump is reloaded via mongorestore.

            With WiredTiger the uncompressed mongodump output is typically larger than the size of files on disk, which are compressed by default. For future backups I would consider using mongodump's built-in archiving and compression options to save yourself an extra step.

            Since your mongodump output is significantly smaller than the storage size, your data files are either highly fragmented or there is some other data that you have not accounted for such as indexes or data in the local database. For example, if you have previously initialised this server as a replica set member the local database would contain a large preallocated replication oplog which will not be exported by mongodump.

            You can potentially reclaim excessive unused space by running the compact command for a WiredTiger collection. However, there is an important caveat: running compact on a collection will block operations for the database being operated on so this should only be used during scheduled maintenance periods.

            MongoDB gzipped-tarball has only 118MB and my gpg file has only 119MB in size.

            Since mongodump output is uncompressed by default, compressing can make a significant difference depending on your data. However, 3.8GB to 119MB seems unreasonably good unless there is something special about your data (large number of small collections? repetitive data?). I would double check that your restored data matches the original in terms of collection counts, document counts, data size, and indexes.

            Source https://stackoverflow.com/questions/44829727

            QUESTION

            How to access node JS(javascript) variables in shell script file
            Asked 2017-May-19 at 12:43

            I'm running shell script file from nodeJS file i need to send some parameters to shell script and use it in shell script

            My js file

            ...

            ANSWER

            Answered 2017-May-19 at 10:34

            although it might be possible, the code mixture looks counter intuitive. I suggest having an environment variable setup for the dbname, both nodejs will capture it with process.env.dbname and the bash script will capture it with $dbname.

            if you insist on the current structure, simply do this:

            Source https://stackoverflow.com/questions/44065083

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install mongo-backup

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/nikmartin/mongo-backup.git

          • CLI

            gh repo clone nikmartin/mongo-backup

          • sshUrl

            git@github.com:nikmartin/mongo-backup.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular Continuous Backup Libraries

            restic

            by restic

            borg

            by borgbackup

            duplicati

            by duplicati

            manifest

            by phar-io

            velero

            by vmware-tanzu

            Try Top Libraries by nikmartin

            mixxxLibraryBuilder

            by nikmartinJavaScript

            motif-web-scale

            by nikmartinTypeScript

            hercules-mixxx-mapping

            by nikmartinJavaScript

            http-static

            by nikmartinHTML

            mixxxwizard

            by nikmartinTypeScript