{"id":26984140,"url":"https://github.com/keshon/backup-to-remote","last_synced_at":"2025-07-04T07:36:00.971Z","repository":{"id":251468324,"uuid":"837507960","full_name":"keshon/backup-to-remote","owner":"keshon","description":"Set of scripts is designed to streamline your backup processes using rclone.","archived":false,"fork":false,"pushed_at":"2024-08-03T07:47:04.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-03T08:49:11.910Z","etag":null,"topics":["backup-script","remote-backup"],"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/keshon.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-08-03T07:19:43.000Z","updated_at":"2024-08-03T08:49:16.962Z","dependencies_parsed_at":"2024-08-03T08:59:18.231Z","dependency_job_id":null,"html_url":"https://github.com/keshon/backup-to-remote","commit_stats":null,"previous_names":["keshon/backup-to-remote"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keshon%2Fbackup-to-remote","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keshon%2Fbackup-to-remote/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keshon%2Fbackup-to-remote/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keshon%2Fbackup-to-remote/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keshon","download_url":"https://codeload.github.com/keshon/backup-to-remote/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247048717,"owners_count":20875098,"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-script","remote-backup"],"created_at":"2025-04-03T17:34:50.315Z","updated_at":"2025-04-03T17:34:50.886Z","avatar_url":"https://github.com/keshon.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🎯 Backup-to-Remote Scripts (Rclone powered)\n\nThis suite of scripts is designed to manage backups of application directories, upload them to a remote server, clean up old backups, and publish statistics on storage usage. Below is a brief overview of each component and its purpose.\n\n## 📁 Scripts Overview\n\n### 1. **`backup.sh`** \nPerforms backups of specified application directories:\n- Checks for changes in the directories.\n- Creates a backup only if changes are detected.\n- Uploads the backup to remote storage.\n- Cleans up old backups locally and remotely.\n- **Usage**: `./backup.sh`\n\n### 2. **`upload.sh`**\nUploads a specified archive file to a remote location using rclone:\n- Verifies the upload by checking the existence of the file on the remote.\n- Deletes the local archive if the upload is verified.\n- **Usage**: `./upload.sh \u003cpath-to-archive\u003e`\n\n### 3. **`cleanup.sh`**\nCleans up old backup files both locally and remotely:\n- Retains a specified number of the most recent backup files on the remote server.\n- Removes old `.zip` files from the local backup directory.\n- **Usage**: `./cleanup.sh`\n\n### 4. **`stats.sh`**\nGenerates and displays storage statistics for the remote backup folder:\n- Lists all files and their sizes.\n- Shows total occupied space and remaining space.\n- **Usage**: `./stats.sh [remote-path]`\n\n## 🔧 Dependencies\n\nEnsure you have the following installed:\n- `rclone` for managing remote storage.\n- `zip` for creating backups.\n- `find` and `stat` for file modification checks.\n- `diff` for comparing file states.\n\n## 🌟 Configuration\n\nConfiguration settings are managed through the `.env` file. Here’s a summary:\n\n- **`LIST_FILE`**: Path to the file containing application directories for backup.\n- **`LOCAL_BACKUP_PATH`**: Local directory for temporary backups.\n- **`UPLOAD_SCRIPT`**: Path to the upload script.\n- **`CLEANING_SCRIPT`**: Path to the cleaning script.\n- **`STATS_SCRIPT`**: Path to the statistics script.\n- **`COPIES_TO_KEEP`**: Number of backup copies to retain on remote storage.\n- **`RCLONE_CONFIG_PATH`**: Path to the rclone configuration file.\n- **`RCLONE_CONFIG_NAME`**: Name of the rclone remote configuration`*`.\n- **`REMOTE_PATH`**: Remote path in the rclone configuration.\n\n`*` Configure rclone remote configuration file using:\n```bash\nrclone config --config ./rclone.conf\n```\nFollow the prompts to configure your remote storage and save the configuration\n\n## 📦 Installation\n\n### 1. Clone this repository:\n```bash\ngit clone https://github.com/keshon/backup-to-remote.git\ncd https://github.com/keshon/backup-to-remote.git\n```\n\n### 2. Create and configure your .env file:\n```bash\ncp .env.example .env\n```\nEdit .env to set your configuration values (see `🌟 Configuration` section above)\n\n### 3. Make sure all scripts are executable:\n```bash\nchmod +x backup.sh upload.sh cleanup.sh stats.sh\n```\n\n### 4. Fill out the .env file:\nCheck the `🌟 Configuration` section above\n\n## 🚀 Running the Scripts\nMain script:\n- Backup: ./backup.sh\n\nAdditional scripts (used by `backup.sh` or independently of it)\n- Upload: ./upload.sh \u003cpath-to-archive\u003e\n- Cleanup: ./cleanup.sh\n- Statistics: ./stats.sh [remote-path]\n\nFor more detailed information on each script, refer to the comments within the scripts themselves.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeshon%2Fbackup-to-remote","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeshon%2Fbackup-to-remote","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeshon%2Fbackup-to-remote/lists"}