{"id":24564745,"url":"https://github.com/abzico/qcloudbackup","last_synced_at":"2025-03-17T01:44:20.866Z","repository":{"id":144085020,"uuid":"103053705","full_name":"abzico/qcloudbackup","owner":"abzico","description":"Backing up script for QCloud's CVM snapshots with customizable parameters implemented in NodeJS","archived":false,"fork":false,"pushed_at":"2018-08-03T18:37:35.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-23T11:34:45.848Z","etag":null,"topics":["backup","china","cvm","cyclic","devops","javascript","js","nodejs","qcloud","server","tencent"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abzico.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2017-09-10T18:53:00.000Z","updated_at":"2018-08-03T18:37:36.000Z","dependencies_parsed_at":"2023-05-26T09:30:39.721Z","dependency_job_id":null,"html_url":"https://github.com/abzico/qcloudbackup","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abzico%2Fqcloudbackup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abzico%2Fqcloudbackup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abzico%2Fqcloudbackup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abzico%2Fqcloudbackup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abzico","download_url":"https://codeload.github.com/abzico/qcloudbackup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243960444,"owners_count":20375101,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["backup","china","cvm","cyclic","devops","javascript","js","nodejs","qcloud","server","tencent"],"created_at":"2025-01-23T11:29:25.478Z","updated_at":"2025-03-17T01:44:20.859Z","avatar_url":"https://github.com/abzico.png","language":"JavaScript","readme":"\u003ca href=\"https://github.com/abzico/donate\"\u003e\u003cimg src=\"https://img.shields.io/badge/$-donate-ff69b4.svg?maxAge=2592000\u0026amp;style=flat\" alt=\"donate\"\u003e\u003c/a\u003e\n\n# qcloudbackup\n\nAutomated cyclic-backup script for CVM as snapshots for specified storageId on QCloud implemented in NodeJS.\n\n# What It Can Do\n\nScript will check first if creating a snapshot for specified `storageId` will require a deletion of existing snapshot or not. QCloud limits number of snapshots to be `number of harddisk` * 7. Then it will create a snapshot.\n\nIt will delay for specified amount of time before attempting to create a snapshot. This is due to consecutive creation of snapshot might be affected by previous un-complete operation even on different storage.\n\n# How To\n\n## Notifying of Backing up Result (optional)\n\nTo be able to notify successful, or failed message to your WeChat account via your WeChat Official/Subscription account with granted permission to send templated message. Then defines all of the following settings.\n\n* `WECHAT_APPID=\u003cyour app id\u003e`\n\n\tCheck at [mp.weixin.qq.com](https://mp.weixin.qq.com) for your WeChat official / subscription account.\n\n* `WECHAT_APPSECRET=\u003cyour app secret\u003e`\n\n\tCheck at [mp.weixin.qq.com](https://mp.weixin.qq.com) for your WeChat official / subscription account.\n\n* `WECHAT_SU_OPENID=\u003cuser open id to receive msgs\u003e`\n\n\tYou can find out what is your open id attached to your WeChat official / subscription account you followed by listing followers list via [Follow List API](http://open.wechat.com/cgi-bin/newreadtemplate?t=overseas_open/docs/oa/user/follower-list#user_follower-list).\n\n* `WECHAT_SUCCESS_TEMPLATE_ID=\u003cyour template id\u003e`\n\n\tCheck at [mp.weixin.qq.com](https://mp.weixin.qq.com) for Template Message section (you might need to apply to grant this ability). Then add a template that has at least 2 **keywords**, with 1 **remark**.\n\n* `WECHAT_FAIL_TEMPLATE_ID=\u003cyour template id\u003e`\n\n\tCheck at [mp.weixin.qq.com](https://mp.weixin.qq.com) for Template Message section (you might need to apply to grant this ability). Then add a template that has at least 4 **keywords**, with 1 **remark**.\n\nYou need to set all of above environment variables in order to make it works.\n\n## Run the Program\n\n1. Install and configure `qcloudcli` properly. See [installation of qcloudcli](https://www.qcloud.com/document/product/440/6181), and how to [configure](https://www.qcloud.com/document/product/440/6184).\n\n2. Modify parameters in `index.js` file.\n\n\t* `storageIds` -\u003e define storageId to apply for backup. You need to define what's yours here.\n\n\t\tYou can loook for `storageIds` easily on QCloud's dashboard in _Cloud Virtual Machine_ and _Cloud Block Storage_. Or via API which needs slightly effort.\n\n\t\tTo get `storageIds` values from API. Execute `qcloudcli cbs DescribeCbsStorages` then look at field `storageId` for each item. Select ones you want then put it into `index.js` file.\n\t* (optional) `kMaxSnapshots` -\u003e define number of snapshots to be hold before deletion oldest one if a new snapshot needs to be created\n\t* (optional) `kWaitBeforeCreation` -\u003e time wait in millisecond just before CreateSnapshot operation will be cariied out, just for safety for consecutive snapshot creation\n\n3. Execute `npm install` to install all dependencies.\n4. Execute `node index.js` to run the program thus begin backing up process.\n5. (optional) Recommend to automate it with cron job.\n\n# License\n\n[MIT](https://github.com/haxpor/qcloudbackup/blob/master/LICENSE), Wasin Thonkaew\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabzico%2Fqcloudbackup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabzico%2Fqcloudbackup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabzico%2Fqcloudbackup/lists"}