Files
fedora-infra_ansible/roles/fedora-docs/proxy/files/docs-rsync.stg
Kevin Fenzi a754144f19 Update infra pagure.io links to forge.fp.o (WIP)
This should update all the references we have to
https://pagure.io/fedora-infrastructure to the
new https://forge.fedoraproject.org/infra/tickets/ area.

Do not merge this before the migration on tuesday.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2026-01-20 14:39:40 -08:00

40 lines
1.3 KiB
Bash
Executable File

#!/bin/sh
# See https://forge.fedoraproject.org/infra/tickets/7130
# Basically we have an OLD (old 7 years ago, as of 2025-10) set of content
# and a new set of content. We want to serve the new content, and if nothing
# exists there then instead serve the old content.
# The simple way is to:
# 1. rsync old to docs.fedoraproject.org
# 2. rsync new to docs.fedoraproject.org
# 3. rsync docs.fedoraproject.org to docs-combined
# BUT see https://forge.fedoraproject.org/infra/tickets/12848
# -a is the std. copy everything "archive" mode.
# -H means try to copy hardlinks as hardlinks
# --no-times --checksum means that if the file changes mtime we still keep
# the old file (and thus. the old hardlink).
rsync_cmd="rsync -aH \
--no-times --checksum \
--timeout 300 \
--delete --delete-after --delete-excluded"
old=sundries01::docs/
new=sundries01::docs-redirects/
docs=/srv/web/docs.fedoraproject.org/
redr=/srv/web/docs-redirects/
comb=/srv/web/docs-combined/
ex1="--exclude=.git --exclude='copying.tmp/'"
$rsync_cmd --link-dest $redr --link-dest $comb $ex1 $old $docs
$rsync_cmd --link-dest $docs --link-dest $comb $ex1 $new $redr
# build the combined docs tree.
$rsync_cmd --exclude='.git*' $docs $redr $comb