{"id":22938949,"url":"https://github.com/blocklune/rclone-backup","last_synced_at":"2025-06-17T04:32:48.972Z","repository":{"id":266605308,"uuid":"898804914","full_name":"BlockLune/rclone-backup","owner":"BlockLune","description":"Back up data with rclone","archived":false,"fork":false,"pushed_at":"2024-12-07T10:09:56.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-16T06:51:16.343Z","etag":null,"topics":["rclone"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/BlockLune.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":"2024-12-05T04:17:32.000Z","updated_at":"2024-12-07T10:09:59.000Z","dependencies_parsed_at":"2024-12-05T06:35:05.753Z","dependency_job_id":null,"html_url":"https://github.com/BlockLune/rclone-backup","commit_stats":null,"previous_names":["blocklune/rclone-backup"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BlockLune/rclone-backup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockLune%2Frclone-backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockLune%2Frclone-backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockLune%2Frclone-backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockLune%2Frclone-backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlockLune","download_url":"https://codeload.github.com/BlockLune/rclone-backup/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockLune%2Frclone-backup/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260293335,"owners_count":22987590,"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":["rclone"],"created_at":"2024-12-14T12:29:02.494Z","updated_at":"2025-06-17T04:32:48.932Z","avatar_url":"https://github.com/BlockLune.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rclone-backup\n\nBackup data with [`rclone`](https://rclone.org).\n\n## Usage\n\nYou need to install `rclone` and configure it first. Check the [rclone documentation](https://rclone.org/docs/) for more information.\n\nThen, download the backup script and make it executable:\n\n```bash\ncurl -O https://raw.githubusercontent.com/BlockLune/rclone-backup/refs/heads/main/backup.sh\nchmod +x backup.sh\n```\n\nBack up your data with the following command (Replace `\u003csrc\u003e` with the source directory and `\u003cdest\u003e` with the destination path. Multiple destinations are supported):\n\n```bash\n./backup.sh \u003csrc\u003e \u003cdest\u003e...\n```\n\nYou can use `--help` to see more options:\n\n```text\nUsage: backup.sh [OPTIONS] \u003csrc\u003e \u003cdest\u003e...\n\nBackup directory using tar and rclone.\n\nOptions:\n  --help                Show this help message\n  --max-files=N         Maximum number of backup files to keep (default: 3, 0 for unlimited)\n  --rclone-config=PATH  Specify rclone config file path\n\nArguments:\n  src                   Source directory to backup\n  dest                  Destination path(s) (rclone remote)\n\nExample:\n  backup.sh /path/to/backup remote:backup/\n  backup.sh --max-files=5 /path/to/backup remote1:backup/ remote2:backup/\n```\n\n## Example Senario\n\nI want to backup `/home/blocklune/docker_data` to my Cloudflare R2 storage. The r2 bucket name is `rclone`, and the directory in it is `docker_data_backup`.\n\nMy rclone configuration file is located at `/root/.config/rclone/rclone.conf` and looks like this:\n\n```text\n[r2]\ntype = s3\nprovider = Cloudflare\naccess_key_id = MY_ACCESS_KEY_ID\nsecret_access_key = MY_SECRET_ACCESS_KEY\nregion = auto\nendpoint = https://MY_ENDPOINT\n```\n\nI will run the following command to add a new backup job:\n\n```bash\nsudo crontab -e\n```\n\nAnd add the following line to the crontab file (run every Sunday, Tuesday, and Friday at 4:00 AM):\n\n```text\n0 4 * * 0,2,5 /home/blocklune/rclone-backup/backup.sh /home/blocklune/docker_data/ r2:rclone/docker_data_backup/ \u003e\u003e /home/blocklune/rclone-backup/backup.log 2\u003e\u00261\n```\n\n## References\n\n- [rclone备份文件至cloudflare的r2 – 栋dong的个人站点](https://itdong.me/linux-to-cloudflarer2-with-rclone/)\n- [利用 Rclone 对服务器备份 - Yunfi](https://yfi.moe/post/rclone-backup)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblocklune%2Frclone-backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblocklune%2Frclone-backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblocklune%2Frclone-backup/lists"}