{"id":25120265,"url":"https://github.com/rochimfn/tbd-backup-script","last_synced_at":"2026-05-06T08:31:22.794Z","repository":{"id":133689417,"uuid":"431007666","full_name":"rochimfn/tbd-backup-script","owner":"rochimfn","description":"Script (primary) custom log shipping","archived":false,"fork":false,"pushed_at":"2021-12-17T17:05:14.000Z","size":136,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-17T04:08:00.105Z","etag":null,"topics":["log-shipping","nodejs","sqlserver"],"latest_commit_sha":null,"homepage":"https://github.com/rochimfn/tbd-log-shipping","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rochimfn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-23T07:48:15.000Z","updated_at":"2021-12-17T17:05:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"a55d9b35-7584-4236-a210-36ef92767d74","html_url":"https://github.com/rochimfn/tbd-backup-script","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rochimfn/tbd-backup-script","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rochimfn%2Ftbd-backup-script","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rochimfn%2Ftbd-backup-script/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rochimfn%2Ftbd-backup-script/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rochimfn%2Ftbd-backup-script/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rochimfn","download_url":"https://codeload.github.com/rochimfn/tbd-backup-script/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rochimfn%2Ftbd-backup-script/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32684592,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T02:33:58.958Z","status":"ssl_error","status_checked_at":"2026-05-06T02:33:39.611Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["log-shipping","nodejs","sqlserver"],"created_at":"2025-02-08T05:29:04.495Z","updated_at":"2026-05-06T08:31:22.777Z","avatar_url":"https://github.com/rochimfn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Script (primary) custom log shipping\n\n## Panduan Pemasangan\n\n### Prerequisite\n\n* [Git](https://git-scm.com/downloads)\n* [NodeJs](https://nodejs.org/en/download/) versi v14 atau lebih tinggi\n* [Yarn](https://classic.yarnpkg.com/lang/en/docs/install/) versi 1.22\n* [MongoDB](https://www.mongodb.com/try/download/community) versi 5.0.3\n* [SQL Server](https://www.microsoft.com/en-us/sql-server/sql-server-downloads) versi 2019 Express edition\n\nPastikan sqlserver memiliki akses baca tulis ke direktori\n\n* `C:\\rc_backup\\` jika menggunakan **windows**\n* `/var/opt/mssql/data/rc_backup/` jika menggunakan **linux**\n\nKustomisasi direktori dapat dilakukan dengan mengedit berkas `modules/dir/prepareDir.js`\n\n```js\n// modules/dir/prepareDir.js\nimport fs from 'fs';\n\nconst prepareDir = (platform) =\u003e {\n    let dir = '';\n    if (platform === 'win32') {\n        dir = 'C:\\\\rc_backup\\\\';\n    } else if (platform === 'linux') {\n        dir = '/var/opt/mssql/data/rc_backup/';\n    }\n\n    if (!fs.existsSync(dir)) {\n        fs.mkdirSync(dir, { recursive: true });\n    }\n    return dir;\n}\n\nexport default prepareDir;\n```\n\n### Mulai Pemasangan\n\n1. Salin repositori\n\n```bash\ngit clone https://github.com/rochimfn/tbd-backup-script.git\n```\n\n2. Masuk ke direktori\n\n```bash\ncd tbd-backup-script\n```\n\n3. Pasang dependensi\n\n```bash\nyarn \n```\n\n4. Konfigurasi `.env`\n\n```bash\ncp .env.example .env #bash atau powershell\ncopy .env.example .env #cmd\n```\n\nIsi konfigurasi dengan kredensial mongodb. Contohnya sebagai berikut:\n\n**Konfigurasi mongodb wajib sama dengan [web monitor](https://github.com/rochimfn/tbd-server-webserver)**\n```env\nMONGO_HOST='127.0.0.1'\nMONGO_PORT='27017'\nMONGO_DATABASE='log_shipping'\nMONGO_USERNAME='admin'\nMONGO_PASSWORD='password'\n```\n\n5. Konfigurasi primary node melalui [web monitor](https://github.com/rochimfn/tbd-server-webserver)\n\n**Sistem ini hanya mendukung single primary node saja**\n\n\n![.github/primary.png](.github/primary.png)\n\n  * Buka halaman Primary Node\n  * Tekan tombol EDIT\n  * Isi `Hostname/ip` dengan hostname/ip dari server primary yang ingin dipasang log shipping\n  * Isi `Port` dengan port dari sql server\n  * Isi `Database` dengan daftar database akan digenerate dan dikirim log shipnya (dipisahkan dengan koma)\n  * Isi `Username DB` dan `Password DB` dengan kredensial sql server yang memiliki akses generate log dan backup database\n  * Tekan tombol `SIMPAN` untuk menyimpan konfigurasi\n\n\n6. Konfigurasi secondary nodes melalui [web monitor](https://github.com/rochimfn/tbd-server-webserver)\n\n**Sistem ini mendukung multi secondary node**\n\n![](.github/secondary.png)\n\n* Buka halaman \"Secondary Nodes\"\n* Tekan tombol \"TAMBAH\"\n* Sesuaikan isian dengan kredensial client secondary (tbd-client-webserver)\n  * default port: `3000`\n  * default email: `rochim.noviyan@gmail.com`\n  * default password: `password`\n* Tekan tombol \"TAMBAH\"\n\n\n\n### Backup Script\n\nScript dapat dijalankan dengan perintah berikut:\n\n```\nnode script.js log\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frochimfn%2Ftbd-backup-script","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frochimfn%2Ftbd-backup-script","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frochimfn%2Ftbd-backup-script/lists"}