{"id":21400252,"url":"https://github.com/oefenweb/ansible-rsync-sync","last_synced_at":"2025-07-13T21:31:07.631Z","repository":{"id":36778238,"uuid":"41084973","full_name":"Oefenweb/ansible-rsync-sync","owner":"Oefenweb","description":"Ansible role to perform synchronization using rsync","archived":false,"fork":false,"pushed_at":"2023-11-02T12:16:37.000Z","size":92,"stargazers_count":4,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-11-02T13:27:22.767Z","etag":null,"topics":["ansible","debian","rsync","rsync-sync","synchronization","ubuntu"],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","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/Oefenweb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2015-08-20T08:39:27.000Z","updated_at":"2023-11-02T13:27:25.248Z","dependencies_parsed_at":"2023-01-17T04:42:46.213Z","dependency_job_id":"fb1bb959-b0e5-4066-992f-ec3919e638cf","html_url":"https://github.com/Oefenweb/ansible-rsync-sync","commit_stats":null,"previous_names":[],"tags_count":51,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oefenweb%2Fansible-rsync-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oefenweb%2Fansible-rsync-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oefenweb%2Fansible-rsync-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oefenweb%2Fansible-rsync-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Oefenweb","download_url":"https://codeload.github.com/Oefenweb/ansible-rsync-sync/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225917645,"owners_count":17544930,"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":["ansible","debian","rsync","rsync-sync","synchronization","ubuntu"],"created_at":"2024-11-22T15:20:13.612Z","updated_at":"2024-11-22T15:20:14.313Z","avatar_url":"https://github.com/Oefenweb.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"## rsync-sync\n\n[![CI](https://github.com/Oefenweb/ansible-rsync-sync/workflows/CI/badge.svg)](https://github.com/Oefenweb/ansible-rsync-sync/actions?query=workflow%3ACI)\n[![Ansible Galaxy](http://img.shields.io/badge/ansible--galaxy-rsync--sync-blue.svg)](https://galaxy.ansible.com/Oefenweb/rsync_sync)\n\nPerform synchronization using [rsync](https://rsync.samba.org/).\n\n#### Requirements\n\n* `rsync` (will be installed)\n\n#### Variables\n\n* `rsync_sync_install_path`: [default: `/usr/local/bin`]: Install directory\n\n* `rsync_sync_scripts`: [default: `{}`]: Scripts declarations\n* `rsync_sync_scripts.key`: [required]: The name of the script (e.g. `last-backup`)\n* `rsync_sync_scripts.key.pre`: [optional, default `[]`]: Pre sync commands\n* `rsync_sync_scripts.key.rsync`: [required]: Rsync declarations\n* `rsync_sync_scripts.key.rsync.src`: [required]: The source directory\n* `rsync_sync_scripts.key.rsync.dest`: [required]: The destination directory\n* `rsync_sync_scripts.key.rsync.options`: [optional, default `[]`]: Options (e.g. `['--aP', '--delete']`)\n* `rsync_sync_scripts.key.rsync.time`: [optional, default `false`]: Whether or not to time the `rsync` command\n* `rsync_sync_scripts.key.post`: [optional, default `[]`]: Post sync commands\n\n* `rsync_sync_x_from_files`: [optional, default `[]`]:\n* `rsync_sync_x_from_files.{n}.path`: [required]: The remote path of the file (relative to `/etc/rsync-sync`)\n* `rsync_sync_x_from_files.{n}.owner`: [optional, default `root`]: The name of the user that should own the file\n* `rsync_sync_x_from_files.{n}.group`: [optional, default `root`]: The name of the group that should own the file\n* `rsync_sync_x_from_files.{n}.mode`: [optional, default `0644`]: The UNIX permission mode bits of the file\n* `rsync_sync_x_from_files.{n}.content`: [optional, default `[]`]: File content lines\n\n* `rsync_sync_jobs`: [default: `[]`]: Sync jobs (scheduled by `cron.d`)\n* `rsync_sync_jobs.{n}.name`: [required]: Description of a crontab entry, should be unique, and changing the value will result in a new cron task being created (e.g. `last-backup`)\n* `rsync_sync_jobs.{n}.job`: [required]: The command to execute (e.g. `/usr/local/bin/last-backup`)\n* `rsync_sync_jobs.{n}.state`: [default: `present`]: Whether to ensure the job is present or absent\n* `rsync_sync_jobs.{n}.day`: [default: `*`]: Day of the month the job should run (`1-31`, `*`, `*/2`)\n* `rsync_sync_jobs.{n}.hour`: [default: `*`]: Hour when the job should run (e.g. `0-23`, `*`, `*/2`)\n* `rsync_sync_jobs.{n}.minute`: [default: `*`]: Minute when the job should run (e.g. `0-59`, `*`, `*/2`)\n* `rsync_sync_jobs.{n}.month`: [default: `*`]: Month of the year the job should run (e.g `1-12`, `*`, `*/2`)\n* `rsync_sync_jobs.{n}.weekday`: [default: `*`]: Day of the week that the job should run (e.g. `0-6` for Sunday-Saturday, `*`)\n\n## Dependencies\n\nNone\n\n#### Example(s)\n\n##### Synchronization a remote backup and import it\n\n```yaml\n---\n- hosts: all\n  roles:\n   - oefenweb.rsync-sync\n  vars:\n    rsync_sync_scripts:\n      last-backup:\n        pre:\n          - 'ssh -q -t example.com \"test ! -f /var/lock/mydumper-backup\"'\n        rsync:\n          src: '-e ssh example.com:/data/backup/mydumper/'\n          dest: '/data/backup/mydumper'\n          options:\n            - '-aP'\n            - '--delete'\n        post:\n          - mydumper-restore\n    rsync_sync_x_from_files:\n      - path: last-backup-include\n        content:\n          - |\n            + *_app.*videos-schema.sql\n            + *_app.*videos.sql\n\n            + *_app_archive.*.sql\n            + *_app_archive.*-schema.sql\n\n            + metadata\n\n            - *\n    rsync_sync_jobs:\n      - name: last-backup\n        job: /usr/local/bin/last-backup\n        minute: 0\n```\n\n#### License\n\nMIT\n\n#### Author Information\n\nMischa ter Smitten\n\n#### Feedback, bug-reports, requests, ...\n\nAre [welcome](https://github.com/Oefenweb/ansible-rsync-sync/issues)!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foefenweb%2Fansible-rsync-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foefenweb%2Fansible-rsync-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foefenweb%2Fansible-rsync-sync/lists"}