Created
August 3, 2017 10:08
-
-
Save spy86/e5ac1a059a2b062bee9d9531b06637ff to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$date = Get-Date -UFormat %Y-%m-%d; | |
$backupFolder = $date; | |
$basePath = "F:\mongodb_backup"; | |
$destinationPath = Join-Path $basePath $backupFolder; | |
if(!(Test-Path -Path $destinationPath)) { | |
New-Item -ItemType directory -Path $destinationPath; | |
(C:\mongodump.exe --out $destinationPath); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment