Skip to content

Commit

Permalink
Merge pull request #352 from sbraz/mirrors_rsync
Browse files Browse the repository at this point in the history
doc/Mirrors: fix example rsync command
  • Loading branch information
jonathanspw authored Feb 2, 2024
2 parents fa97f09 + 13f8a0c commit a1d22bf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/Mirrors.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ Use updated version of `rsync` with `xxhash` support.
xxh128 xxh3 xxh64 (xxhash) md5 md4 sha1 none
```
:::
2. Synchronize with the official AlmaLinux mirror via `rsync`:
2. Synchronize with the official AlmaLinux mirror via `rsync`:
```shell
/usr/bin/rsync -avSH -f 'R .~tmp~' --delete-delay --delay-updates rsync://rsync.repo.almalinux.org/almalinux/ /almalinux/dir/on/your/server/
/usr/bin/rsync -avSH --exclude='.~tmp~' --delete-delay --delay-updates rsync://rsync.repo.almalinux.org/almalinux/ /almalinux/dir/on/your/server/
```
- The official tier0 rsync mirrors are in Atlanta, GA, USA, and Seattle, WA, USA. We use geolocation-based DNS steering to send your traffic to the closest tier0 mirror. If your mirror is not in the United States or you are
otherwise seeing suboptimal speed from this source we recommend performing the **initial** sync from a mirror
close to you. Make sure that your cron syncs from the official mirror, however.
3. Create a cron task to sync it periodically (we recommend updating the
mirror every 3 hours):
```shell
0 */3 * * * sleep $(((RANDOM\%3500)+1)) && /usr/bin/flock -n /var/run/almalinux_rsync.lock -c "/usr/bin/rsync -avSH -f 'R .~tmp~' --delete-delay --delay-updates rsync://rsync.repo.almalinux.org/almalinux/ /almalinux/dir/on/your/server/"
0 */3 * * * sleep $(((RANDOM\%3500)+1)) && /usr/bin/flock -n /var/run/almalinux_rsync.lock -c "/usr/bin/rsync -avSH --exclude='.~tmp~' --delete-delay --delay-updates rsync://rsync.repo.almalinux.org/almalinux/ /almalinux/dir/on/your/server/"
```
4. Ensure the accuracy of city, longitude, and latitude data for your mirror IP(s) with IPinfo at
[https://ipinfo.io](https://ipinfo.io).
Expand All @@ -60,7 +60,7 @@ Use updated version of `rsync` with `xxhash` support.
You can use the [official AlmaLinux repo file](https://github.com/AlmaLinux/mirrors/blob/master/mirrors.d/repo.almalinux.org.yml)
as an example. Your mirror does not have to provide all the protocols
that our main mirror provides, but either HTTP or HTTPS is required. Format of a mirror's config is described below.
Also, you can validate your config to use some JSON online validator using [that JSON schema](https://github.com/AlmaLinux/mirrors/blob/yaml_snippets/json_schemas/mirror_config.json) and converting your config to JSON.
Also, you can validate your config to use some JSON online validator using [that JSON schema](https://github.com/AlmaLinux/mirrors/blob/yaml_snippets/json_schemas/mirror_config.json) and converting your config to JSON.
```YAML
---
Expand Down

0 comments on commit a1d22bf

Please sign in to comment.