{"id":22360657,"url":"https://github.com/prajwalsd/remote-sync-scripts","last_synced_at":"2025-03-26T14:29:27.216Z","repository":{"id":223477620,"uuid":"685984041","full_name":"PrajwalSD/remote-sync-scripts","owner":"PrajwalSD","description":"A simple bash shell script for syncing files/directories between remote and local machines based on rsync","archived":false,"fork":false,"pushed_at":"2024-02-20T12:20:08.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-31T15:47:08.429Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/PrajwalSD.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":"2023-09-01T13:10:36.000Z","updated_at":"2023-09-01T13:14:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"bbf3892c-e1e9-4c5e-a186-9d923be060c9","html_url":"https://github.com/PrajwalSD/remote-sync-scripts","commit_stats":null,"previous_names":["prajwalsd/remote-sync-scripts"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrajwalSD%2Fremote-sync-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrajwalSD%2Fremote-sync-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrajwalSD%2Fremote-sync-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrajwalSD%2Fremote-sync-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PrajwalSD","download_url":"https://codeload.github.com/PrajwalSD/remote-sync-scripts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245670241,"owners_count":20653328,"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":[],"created_at":"2024-12-04T16:17:59.393Z","updated_at":"2025-03-26T14:29:27.210Z","avatar_url":"https://github.com/PrajwalSD.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Intro\n\nA simple bash shell script for syncing files/directories between remote and local machines based on [rsync](https://linux.die.net/man/1/rsync).\n\nWorks on both Windows (using WSL) and macOS (natively).\n\n# Prerequisites (only for Windows OS)\n\n- Follow the instructions on this [page](https://ubuntu.com/wsl) to get Ubuntu (or any distro) installed in Windows WSL. This allows you to run bash shell scripts on Windows OS.\n- Run `sudo apt install rsync openssh-client` command in the newly installed WSL Ubuntu shell to install `rsync` utility.\n- Optionally, install [dos2unix on Ubuntu WSL](https://askubuntu.com/questions/1117623/how-to-install-dos2unix-on-a-ubuntu-app-on-a-windows-10-machine)\n\n# Installation\n\n- Clone/download the repo.\n- Run `dos2unix /\u003cscript-root-directory\u003e/*.sh`\n- Optionally, you can avoid entering the remote server password every time you run the scripts by setting up a [password-less ssh in 3-easy steps](https://www.tecmint.com/ssh-passwordless-login-using-ssh-keygen-in-5-easy-steps/). Skip this step if you're OK with entering password everytime you run the script.\n\n# Usage\n\n## Download files (local \u003c-- remote)\n\n    ./download.sh`\u003cdownload-list-file-name\u003e` `\u003cdownload-exceptions-list-file-name\u003e` `\u003coptional-local-root-directory\u003e` `\u003coptional-remote-root-directory\u003e`\n\n### Arguments\n\n- `\u003cdownload-list-file-name\u003e`: A file containing the list of directories that need to be downloaded along with server details\n  * Format: `\u003cyour-id\u003e@\u003cyour-server.demo.com\u003e:/home/user/some-solution \u003e /mnt/C/some-solution`\n  * If you want to sync the contents of a remote directory to a local directory with a different name, use the following:\n    * Format: `\u003cyour-id\u003e@\u003cyour-server.demo.com\u003e:/home/user/some-solution/ \u003e /mnt/C/some-solution/dummy-folder-name` (please note the trailing slash (`/`) at the end of the remote directory path specification and the  `dummy-folder-name)`\n- `\u003cdownload-exceptions-list-file-name\u003e`: A file containing the list of files/directories that needs to be excluded from download operation\n  * Example: `.git`\n- `\u003coptional-local-root-directory\u003e`: (Optional) Root directory on your local machine\n- `\u003coptional-remote-root-directory\u003e`: (Optional) Root directory on your remote machine\n\n## Upload files (local --\u003e remote)\n\n    ./upload.sh`\u003cupload-list-file-name\u003e` `\u003cupload-exceptions-list-file-name\u003e` `\u003coptional-local-root-directory\u003e` `\u003coptional-remote-root-directory\u003e`\n\n### Arguments\n\n- `\u003cupload-list-file-name\u003e`: A file containing the list of directories that need to be uploaded along with server details\n  * Format: `/mnt/C/some-solution \u003e \u003cyour-id\u003e@\u003cyour-server.demo.com\u003e:/home/user/some-solution`\n  * If you want to sync the contents of a remote directory to a local directory with a different name, use the following:* Format: `/mnt/C/some-solution/ \u003e \u003cyour-id\u003e@\u003cyour-server.demo.com\u003e:/home/user/some-other-folder-name/dummy-folder-name` (please note the trailing slash (`/`) at the end of the remote directory path specification and the  `dummy-folder-name)`\n- `\u003cupload-exceptions-list-file-name\u003e`: A file containing the list of files/directories that needs to be excluded from upload operation\n  * Example: `.git`\n- `\u003coptional-local-root-directory\u003e`: (Optional) Root directory on your local machine\n- `\u003coptional-remote-root-directory\u003e`: (Optional) Root directory on your remote machine\n\n# Useful info\n\n- To enable verbose mode, just append `--debug` at the invocation command (e.g.: `./download.sh --debug \u003cdownload-list-file-name\u003e \u003cdownload-exceptions-list-file-name\u003e`)\n- `~/.tmp` contains sync timestamps, remove this folder to reset everything!\n\n# Resources\n\n- [Understanding the output of rsync --itemize-changes](http://web.archive.org/web/20160904174444/http://andreafrancia.it/2010/03/understanding-the-output-of-rsync-itemize-changes.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprajwalsd%2Fremote-sync-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprajwalsd%2Fremote-sync-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprajwalsd%2Fremote-sync-scripts/lists"}