AFAIK, I don't think there is a perfect solution if you sync via
rsync. At least, you cannot avoid upsteam change when you are
sync-ing.
You may have a look at Debian's ftpsync script. They introduce some
pre-checks and two-step rsync procedure two lower the possibility of
incomlete mirror state. If I remember correctly, the mirror should be
always complete when total sync chain (from official master repo to
local one) using the script.
Some generic suggestions:
1. Choose a faster and reliable upsteam. If your sync progress takes
about a day and upsteam files change every hour, your sync is never
complete.
2. Use some rsync options like --delete-after --delay-updates to
prevent incomlete states when sync-ing. Both options postpone local
file change to the end of sync.
3. Try to find out the time and frequency of upsteam's sync task. You
then choose a good timing. Some mirrors' sync script create a temp
file in the root to warn that they are sync-ing, or provide a
timestamp file.
Pacman's db is quite easy to parse. But my mirror is a quite big one
with many repos. I don't think it's a good idea to write a custom
checking script for every single repo. Maybe in the future we could
have a better sync program for mirroring.
2016-02-06 19:04 GMT+08:00 Rafal Maszkowski
On Sat, Feb 06, 2016 at 11:05:51AM +0100, Florian Pritz wrote:
Am 2016-02-05 22:42, schrieb Dennis Börm:
i've setup a mirror this week. one sync today synced an incomplete state from a tier1 mirror. is there a tool/script to determine if a/my mirror is in a consistent state? I am not aware of any such tool. I'm forwarding this to arch-general in the hope that someone either knows or wants to create one.
rsync with -n option. But if FTP was used for this syncing the times may be shifted. In this case you FTP mirroring tool (like mirror) may have its -n option or an analogue.
R. -- „Walczy on z całym zapamiętaniem przeciwko intelektowi” - z akt personalnych prof. A. Baeumlera _______________________________________________ arch-mirrors mailing list arch-mirrors@archlinux.org https://lists.archlinux.org/listinfo/arch-mirrors
-- 崔灏 / CUI Hao Homepage: i-yu.me Twitter: @cuihaoleo