Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/suryaadtmaja/cadangan
https://github.com/suryaadtmaja/cadangan
Last synced: 14 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/suryaadtmaja/cadangan
- Owner: suryaadtmaja
- Created: 2021-03-06T18:12:19.000Z (almost 4 years ago)
- Default Branch: dev
- Last Pushed: 2021-10-10T12:45:45.000Z (over 3 years ago)
- Last Synced: 2025-01-09T11:52:09.431Z (17 days ago)
- Language: JavaScript
- Size: 67.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Cadangan
Backup mysql database regularly using cadangan, you can specifically set the schedule for backup in index.js if you're not familiar with cronjob, you can use https://crontab.guru/ and change the schedule \* \* \* \* \*
async function backupInit() {
cron.schedule("* * * * *", () => {
getDb().catch((e) => {
console.log(e);
});
});
}# How to start cadangan
- Install pm2 https://pm2.keymetrics.io/
- clone this repo
- change the script start in package.json node "index.js --type mysql --dbname databasename"
- start the project by running `pm2 start npm --name "backup name" -- start"`> Created using node.js