Automatically backing up your MongoDB

Comments

8 comments

  • Avatar
    David Hertzberg

    Thanks ! I am installing it right now !

    Quick question though : for the backup script, do you have to use the WriteUser or you could use a ReadUser ?

    Best,

    David.

    0
    Comment actions Permalink
  • Avatar
    Sam Ovenshine

    Hi David,

    Just tested the MongoDump utility with the ReadUser, and it did run successfully.

    Thanks,
    Sam

    0
    Comment actions Permalink
  • Avatar
    Conor Hennessy

    Hi,

    The first cmd in both scripts do not work (switching to C drive): C:\ 

    If you change it to C: it works as it should. You would not notice this if your script is run from C drive but if you try run from another drive the script fails.

    Conor

    0
    Comment actions Permalink
  • Avatar
    Omer

    Hi Conor,

    Thanks for bringing this to our attention.

    I tried to reproduce this issue but couldn't, could you please provide me with steps in order to do so?

     

    Thanks,

    0
    Comment actions Permalink
  • Avatar
    Conor Hennessy

    I have script on D drive, when i run it from there it failed to switch to C drive with cmd: "C:\" and so cannot run.

    This is the output:


    D:\Scripts>c:\
    'c:\' is not recognized as an internal or external command,
    operable program or batch file.

    D:\Scripts>cd C:\Program Files\Sisense\Infra\MongoDB

    D:\Scripts>mongodump --host localhost:27018 --db prismConfig --out C:\SisenseWeb
    Backups\MongoBackup --authenticationDatabase admin -u x -p x
    'mongodump' is not recognized as an internal or external command,
    operable program or batch file.

    D:\Scripts>mongodump --host localhost:27018 --db prismWebDB --out C:\SisenseWebB
    ackups\MongoBackup --authenticationDatabase admin -u x -p x
    'mongodump' is not recognized as an internal or external command,
    operable program or batch file.

    D:\Scripts>pause
    Press any key to continue . . .

     

    0
    Comment actions Permalink
  • Avatar
    Andrew Block

    This is great nice work Omer!

    1
    Comment actions Permalink
  • Avatar
    Sam Ovenshine

    Hi Conor,

    Thanks for the feedback. I've updated the scripts to fix this issue.

    Thanks,
    Sam

    0
    Comment actions Permalink
  • Avatar
    Thomas Warner

    Is it necessary to run 'MongoBackup.bat' or is copying (or backing up) the directories in this post good enough? https://documentation.sisense.com/latest/getting-started/backing_up_sisense.htm

    ------

    1. In Windows Services, stop the Sisense.Repository and Sisense.Discovery services.
    2. Open the directory: 
      %ProgramData%\Sisense\PrismWeb\Repository\DB
    3. Copy the data to your backup location maintaining the same file structure.
    4. Open the directory:
      %ProgramData%\Sisense\Infra\Discovery
    5. Copy the data to your backup location maintaining the same file structure.
    6. (Optional) Back up your custom plugins by copying the directory:
      C:\Program Files\Sisense\PrismWeb\plugins
    0
    Comment actions Permalink

Please sign in to leave a comment.