https://github.com/gotocva/mongodb-auto-backup
https://github.com/gotocva/mongodb-auto-backup
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/gotocva/mongodb-auto-backup
- Owner: gotocva
- Created: 2022-12-06T10:42:49.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-06T10:44:52.000Z (over 3 years ago)
- Last Synced: 2025-03-12T01:44:22.096Z (over 1 year ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mongodb-auto-backup
Basic mongo dump and restore commands, they contain more options you can have a look at man page for both of them.
1. mongodump --db=DB_NAME --archive=./DB_NAME.gzip --gzip
2. mongorestore --db=DB_NAME --archive=./DB_NAME.gzip --gzip
* Cron expression for every 5 seconds - */5 * * * * *
* Cron expression for every night at 00:00 hours (0 0 * * * )
```
Note: 2nd expression only contains 5 fields, since seconds is not necessary
```