Getting empty folder when using mongodump to back up my MongoDB Announcing the arrival of...

Did Krishna say in Bhagavad Gita "I am in every living being"

Disembodied hand growing fangs

What is the difference between globalisation and imperialism?

Does the Weapon Master feat grant you a fighting style?

Why does it sometimes sound good to play a grace note as a lead in to a note in a melody?

Are all finite dimensional hilbert spaces isomorphic to spaces with Euclidean norms?

NumericArray versus PackedArray in MMA12

What initially awakened the Balrog?

Time to Settle Down!

Why wasn't DOSKEY integrated with COMMAND.COM?

What was the first language to use conditional keywords?

If Windows 7 doesn't support WSL, then what does Linux subsystem option mean?

Can an alien society believe that their star system is the universe?

Find 108 by using 3,4,6

Should I follow up with an employee I believe overracted to a mistake I made?

Is it fair for a professor to grade us on the possession of past papers?

Why doesn't SQL Optimizer use my constraint?

Why should I vote and accept answers?

ArcGIS Pro Python arcpy.CreatePersonalGDB_management

Why aren't air breathing engines used as small first stages?

What would you call this weird metallic apparatus that allows you to lift people?

What is the appropriate index architecture when forced to implement IsDeleted (soft deletes)?

What is this clumpy 20-30cm high yellow-flowered plant?

Why does the remaining Rebel fleet at the end of Rogue One seem dramatically larger than the one in A New Hope?



Getting empty folder when using mongodump to back up my MongoDB



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern)Using MongoDB and PostgreSQL togetherIs that possible to backup MongoDB sharded cluster without LVM or mongodump?Mongodb - see when a database was droppedWhile running Mongodb, getting “enabling http interface” message and stoppedMongoDB: removeShard when dbsToMove is an empty arrayBacking up a MongoDB cluster with mongodump?Arguments for MongoDB backup with OpsManager or mongodump?MongoDB import bson files from a folderMongoDB find() not getting anythinggetIndexes returns empty array on MongoDB collection





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







2















Basically, I have a problem with using mongodump to back up my MongoDB.



This is the general syntax I use in SSH:



mongodump -d myDatabaseName -o ~/backups/my_backup


This is the resulting message:



Fri Apr 22 20:39:57.304 DATABASE: myDatabaseName   to     /root/backups/my_backup/myDatabaseName


This simply generates a blank folder with no files in it whatsoever. The actual database is fairly large, so not sure what's going on.



I would also like to add that my mongodump client and my MongoDB version are both the same (version 2.4.9).



Not sure how to go about fixing this. Any help is appreciated.










share|improve this question
















bumped to the homepage by Community 4 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • Few things to check: 1. Is the mongodb instance running on same instance you are running mongodump? 2. Do you see anything in logs related to mongodump?

    – Astro
    Apr 23 '16 at 15:33











  • @Astro Yes to #1. I don't see any logs related to mongodump at all.

    – Mabeh Al-Zuq Yadeek
    Apr 23 '16 at 20:45


















2















Basically, I have a problem with using mongodump to back up my MongoDB.



This is the general syntax I use in SSH:



mongodump -d myDatabaseName -o ~/backups/my_backup


This is the resulting message:



Fri Apr 22 20:39:57.304 DATABASE: myDatabaseName   to     /root/backups/my_backup/myDatabaseName


This simply generates a blank folder with no files in it whatsoever. The actual database is fairly large, so not sure what's going on.



I would also like to add that my mongodump client and my MongoDB version are both the same (version 2.4.9).



Not sure how to go about fixing this. Any help is appreciated.










share|improve this question
















bumped to the homepage by Community 4 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • Few things to check: 1. Is the mongodb instance running on same instance you are running mongodump? 2. Do you see anything in logs related to mongodump?

    – Astro
    Apr 23 '16 at 15:33











  • @Astro Yes to #1. I don't see any logs related to mongodump at all.

    – Mabeh Al-Zuq Yadeek
    Apr 23 '16 at 20:45














2












2








2


1






Basically, I have a problem with using mongodump to back up my MongoDB.



This is the general syntax I use in SSH:



mongodump -d myDatabaseName -o ~/backups/my_backup


This is the resulting message:



Fri Apr 22 20:39:57.304 DATABASE: myDatabaseName   to     /root/backups/my_backup/myDatabaseName


This simply generates a blank folder with no files in it whatsoever. The actual database is fairly large, so not sure what's going on.



I would also like to add that my mongodump client and my MongoDB version are both the same (version 2.4.9).



Not sure how to go about fixing this. Any help is appreciated.










share|improve this question
















Basically, I have a problem with using mongodump to back up my MongoDB.



This is the general syntax I use in SSH:



mongodump -d myDatabaseName -o ~/backups/my_backup


This is the resulting message:



Fri Apr 22 20:39:57.304 DATABASE: myDatabaseName   to     /root/backups/my_backup/myDatabaseName


This simply generates a blank folder with no files in it whatsoever. The actual database is fairly large, so not sure what's going on.



I would also like to add that my mongodump client and my MongoDB version are both the same (version 2.4.9).



Not sure how to go about fixing this. Any help is appreciated.







mongodb mongodb2.4






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 1 '18 at 7:28









Md Haidar Ali Khan

3,94672442




3,94672442










asked Apr 23 '16 at 0:59









Mabeh Al-Zuq YadeekMabeh Al-Zuq Yadeek

1133




1133





bumped to the homepage by Community 4 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 4 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • Few things to check: 1. Is the mongodb instance running on same instance you are running mongodump? 2. Do you see anything in logs related to mongodump?

    – Astro
    Apr 23 '16 at 15:33











  • @Astro Yes to #1. I don't see any logs related to mongodump at all.

    – Mabeh Al-Zuq Yadeek
    Apr 23 '16 at 20:45



















  • Few things to check: 1. Is the mongodb instance running on same instance you are running mongodump? 2. Do you see anything in logs related to mongodump?

    – Astro
    Apr 23 '16 at 15:33











  • @Astro Yes to #1. I don't see any logs related to mongodump at all.

    – Mabeh Al-Zuq Yadeek
    Apr 23 '16 at 20:45

















Few things to check: 1. Is the mongodb instance running on same instance you are running mongodump? 2. Do you see anything in logs related to mongodump?

– Astro
Apr 23 '16 at 15:33





Few things to check: 1. Is the mongodb instance running on same instance you are running mongodump? 2. Do you see anything in logs related to mongodump?

– Astro
Apr 23 '16 at 15:33













@Astro Yes to #1. I don't see any logs related to mongodump at all.

– Mabeh Al-Zuq Yadeek
Apr 23 '16 at 20:45





@Astro Yes to #1. I don't see any logs related to mongodump at all.

– Mabeh Al-Zuq Yadeek
Apr 23 '16 at 20:45










2 Answers
2






active

oldest

votes


















0














I was using the default mongodb-client deb package with Ubuntu. I removed those and installed the mongodb-org-tools package from mongodb.com https://docs.mongodb.com/master/tutorial/install-mongodb-on-ubuntu/?_ga=2.36209632.1945690590.1499275806-1594815486.1499275806



They have other install instructions for your specific OS if you are not on Ubuntu https://www.mongodb.com/download-center?jmp=nav#community






share|improve this answer































    0














    As per MongoDB BOL Here Back Up a Database with mongodump Exclude local Database



    mongodump excludes the content of the local database in its output.


    Required Access



    To run mongodump against a MongoDB deployment that has access control enabled, you must have privileges that grant find action for each database to back up. The built-in backup role provides the required privileges to perform backup of any and all databases.



    Changed in version 3.2.1: The backup role provides additional privileges to back up the system.profile collections that exist when running with database profiling. Previously, users required an additional read access on this collection.



    The mongodump utility backs up data by connecting to a running mongod or mongos instance.



    The utility can create a backup for an entire server, database or collection, or can use a query to backup just part of a collection.



    When you run mongodump without any arguments, the command connects to the MongoDB instance on the local system (e.g. 127.0.0.1 or localhost) on port 27017 and creates a database backup named dump/ in the current directory.



    To backup data from a mongod or mongos instance running on the same machine and on the default port of 27017, use the following command:



    mongodump


    The data format used by mongodump from version 2.2 or later is incompatible with earlier versions of mongod. Do not use recent versions of mongodump to back up older data stores.



    You can also specify the --host and --port of the MongoDB instance that the mongodump should connect to. For example:



    mongodump --host mongodb.example.net --port 27017


    To specify a different output directory, you can use the --out or -o option:



    mongodump --out /data/backup/


    To limit the amount of data included in the database dump, you can specify --db and --collection as options to mongodump. For example:



    mongodump --collection myCollection --db test


    This operation creates a dump of the collection named myCollection from the database test in a dump/ subdirectory of the current working directory.



    mongodump overwrites output files if they exist in the backup data folder. Before running the mongodump command multiple times, either ensure that you no longer need the files in the output folder (the default is the dump/ folder) or rename the folders or files.



    For further your ref Here & Here






    share|improve this answer
























      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "182"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f136287%2fgetting-empty-folder-when-using-mongodump-to-back-up-my-mongodb%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      I was using the default mongodb-client deb package with Ubuntu. I removed those and installed the mongodb-org-tools package from mongodb.com https://docs.mongodb.com/master/tutorial/install-mongodb-on-ubuntu/?_ga=2.36209632.1945690590.1499275806-1594815486.1499275806



      They have other install instructions for your specific OS if you are not on Ubuntu https://www.mongodb.com/download-center?jmp=nav#community






      share|improve this answer




























        0














        I was using the default mongodb-client deb package with Ubuntu. I removed those and installed the mongodb-org-tools package from mongodb.com https://docs.mongodb.com/master/tutorial/install-mongodb-on-ubuntu/?_ga=2.36209632.1945690590.1499275806-1594815486.1499275806



        They have other install instructions for your specific OS if you are not on Ubuntu https://www.mongodb.com/download-center?jmp=nav#community






        share|improve this answer


























          0












          0








          0







          I was using the default mongodb-client deb package with Ubuntu. I removed those and installed the mongodb-org-tools package from mongodb.com https://docs.mongodb.com/master/tutorial/install-mongodb-on-ubuntu/?_ga=2.36209632.1945690590.1499275806-1594815486.1499275806



          They have other install instructions for your specific OS if you are not on Ubuntu https://www.mongodb.com/download-center?jmp=nav#community






          share|improve this answer













          I was using the default mongodb-client deb package with Ubuntu. I removed those and installed the mongodb-org-tools package from mongodb.com https://docs.mongodb.com/master/tutorial/install-mongodb-on-ubuntu/?_ga=2.36209632.1945690590.1499275806-1594815486.1499275806



          They have other install instructions for your specific OS if you are not on Ubuntu https://www.mongodb.com/download-center?jmp=nav#community







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jul 5 '17 at 18:38









          JKOlafJKOlaf

          101




          101

























              0














              As per MongoDB BOL Here Back Up a Database with mongodump Exclude local Database



              mongodump excludes the content of the local database in its output.


              Required Access



              To run mongodump against a MongoDB deployment that has access control enabled, you must have privileges that grant find action for each database to back up. The built-in backup role provides the required privileges to perform backup of any and all databases.



              Changed in version 3.2.1: The backup role provides additional privileges to back up the system.profile collections that exist when running with database profiling. Previously, users required an additional read access on this collection.



              The mongodump utility backs up data by connecting to a running mongod or mongos instance.



              The utility can create a backup for an entire server, database or collection, or can use a query to backup just part of a collection.



              When you run mongodump without any arguments, the command connects to the MongoDB instance on the local system (e.g. 127.0.0.1 or localhost) on port 27017 and creates a database backup named dump/ in the current directory.



              To backup data from a mongod or mongos instance running on the same machine and on the default port of 27017, use the following command:



              mongodump


              The data format used by mongodump from version 2.2 or later is incompatible with earlier versions of mongod. Do not use recent versions of mongodump to back up older data stores.



              You can also specify the --host and --port of the MongoDB instance that the mongodump should connect to. For example:



              mongodump --host mongodb.example.net --port 27017


              To specify a different output directory, you can use the --out or -o option:



              mongodump --out /data/backup/


              To limit the amount of data included in the database dump, you can specify --db and --collection as options to mongodump. For example:



              mongodump --collection myCollection --db test


              This operation creates a dump of the collection named myCollection from the database test in a dump/ subdirectory of the current working directory.



              mongodump overwrites output files if they exist in the backup data folder. Before running the mongodump command multiple times, either ensure that you no longer need the files in the output folder (the default is the dump/ folder) or rename the folders or files.



              For further your ref Here & Here






              share|improve this answer




























                0














                As per MongoDB BOL Here Back Up a Database with mongodump Exclude local Database



                mongodump excludes the content of the local database in its output.


                Required Access



                To run mongodump against a MongoDB deployment that has access control enabled, you must have privileges that grant find action for each database to back up. The built-in backup role provides the required privileges to perform backup of any and all databases.



                Changed in version 3.2.1: The backup role provides additional privileges to back up the system.profile collections that exist when running with database profiling. Previously, users required an additional read access on this collection.



                The mongodump utility backs up data by connecting to a running mongod or mongos instance.



                The utility can create a backup for an entire server, database or collection, or can use a query to backup just part of a collection.



                When you run mongodump without any arguments, the command connects to the MongoDB instance on the local system (e.g. 127.0.0.1 or localhost) on port 27017 and creates a database backup named dump/ in the current directory.



                To backup data from a mongod or mongos instance running on the same machine and on the default port of 27017, use the following command:



                mongodump


                The data format used by mongodump from version 2.2 or later is incompatible with earlier versions of mongod. Do not use recent versions of mongodump to back up older data stores.



                You can also specify the --host and --port of the MongoDB instance that the mongodump should connect to. For example:



                mongodump --host mongodb.example.net --port 27017


                To specify a different output directory, you can use the --out or -o option:



                mongodump --out /data/backup/


                To limit the amount of data included in the database dump, you can specify --db and --collection as options to mongodump. For example:



                mongodump --collection myCollection --db test


                This operation creates a dump of the collection named myCollection from the database test in a dump/ subdirectory of the current working directory.



                mongodump overwrites output files if they exist in the backup data folder. Before running the mongodump command multiple times, either ensure that you no longer need the files in the output folder (the default is the dump/ folder) or rename the folders or files.



                For further your ref Here & Here






                share|improve this answer


























                  0












                  0








                  0







                  As per MongoDB BOL Here Back Up a Database with mongodump Exclude local Database



                  mongodump excludes the content of the local database in its output.


                  Required Access



                  To run mongodump against a MongoDB deployment that has access control enabled, you must have privileges that grant find action for each database to back up. The built-in backup role provides the required privileges to perform backup of any and all databases.



                  Changed in version 3.2.1: The backup role provides additional privileges to back up the system.profile collections that exist when running with database profiling. Previously, users required an additional read access on this collection.



                  The mongodump utility backs up data by connecting to a running mongod or mongos instance.



                  The utility can create a backup for an entire server, database or collection, or can use a query to backup just part of a collection.



                  When you run mongodump without any arguments, the command connects to the MongoDB instance on the local system (e.g. 127.0.0.1 or localhost) on port 27017 and creates a database backup named dump/ in the current directory.



                  To backup data from a mongod or mongos instance running on the same machine and on the default port of 27017, use the following command:



                  mongodump


                  The data format used by mongodump from version 2.2 or later is incompatible with earlier versions of mongod. Do not use recent versions of mongodump to back up older data stores.



                  You can also specify the --host and --port of the MongoDB instance that the mongodump should connect to. For example:



                  mongodump --host mongodb.example.net --port 27017


                  To specify a different output directory, you can use the --out or -o option:



                  mongodump --out /data/backup/


                  To limit the amount of data included in the database dump, you can specify --db and --collection as options to mongodump. For example:



                  mongodump --collection myCollection --db test


                  This operation creates a dump of the collection named myCollection from the database test in a dump/ subdirectory of the current working directory.



                  mongodump overwrites output files if they exist in the backup data folder. Before running the mongodump command multiple times, either ensure that you no longer need the files in the output folder (the default is the dump/ folder) or rename the folders or files.



                  For further your ref Here & Here






                  share|improve this answer













                  As per MongoDB BOL Here Back Up a Database with mongodump Exclude local Database



                  mongodump excludes the content of the local database in its output.


                  Required Access



                  To run mongodump against a MongoDB deployment that has access control enabled, you must have privileges that grant find action for each database to back up. The built-in backup role provides the required privileges to perform backup of any and all databases.



                  Changed in version 3.2.1: The backup role provides additional privileges to back up the system.profile collections that exist when running with database profiling. Previously, users required an additional read access on this collection.



                  The mongodump utility backs up data by connecting to a running mongod or mongos instance.



                  The utility can create a backup for an entire server, database or collection, or can use a query to backup just part of a collection.



                  When you run mongodump without any arguments, the command connects to the MongoDB instance on the local system (e.g. 127.0.0.1 or localhost) on port 27017 and creates a database backup named dump/ in the current directory.



                  To backup data from a mongod or mongos instance running on the same machine and on the default port of 27017, use the following command:



                  mongodump


                  The data format used by mongodump from version 2.2 or later is incompatible with earlier versions of mongod. Do not use recent versions of mongodump to back up older data stores.



                  You can also specify the --host and --port of the MongoDB instance that the mongodump should connect to. For example:



                  mongodump --host mongodb.example.net --port 27017


                  To specify a different output directory, you can use the --out or -o option:



                  mongodump --out /data/backup/


                  To limit the amount of data included in the database dump, you can specify --db and --collection as options to mongodump. For example:



                  mongodump --collection myCollection --db test


                  This operation creates a dump of the collection named myCollection from the database test in a dump/ subdirectory of the current working directory.



                  mongodump overwrites output files if they exist in the backup data folder. Before running the mongodump command multiple times, either ensure that you no longer need the files in the output folder (the default is the dump/ folder) or rename the folders or files.



                  For further your ref Here & Here







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Dec 31 '17 at 6:15









                  Md Haidar Ali KhanMd Haidar Ali Khan

                  3,94672442




                  3,94672442






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Database Administrators Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f136287%2fgetting-empty-folder-when-using-mongodump-to-back-up-my-mongodb%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Parapolítica Índice Antecedentes El escándalo Proceso judicial Consecuencias Véase...

                      How to remove border from elements in the last row?Targeting flex items on the last rowHow to vertically wrap...

                      Tecnologías entrañables Índice Antecedentes Desarrollo Tecnologías Entrañables en la...