Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write Database backup scripts #1

Open
Liopun opened this issue Sep 29, 2020 · 0 comments
Open

Write Database backup scripts #1

Liopun opened this issue Sep 29, 2020 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Liopun
Copy link
Owner

Liopun commented Sep 29, 2020

Avoid data loss in case of node failures or human errors.

Writing scripts for database backups is fairly simple. You can use Mongoexport to export collections as JSON or CSV, or Mongodump to dump the whole database.

You may use node-cron or node-schedule npm libraries for running cron jobs to take timely database backups.

You may create a folder named scripts in the root folder and add your script to that. That script will be run independent of this server to avoid performance issues.

@Liopun Liopun added enhancement New feature or request good first issue Good for newcomers labels Sep 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant