Fine tune rsync for just main & community x86_64 of v3.7. - Repo Mirror
-
- Offline
- 2 months 3 weeks ago
- 2018-01-01
I need some help in devising the correct include/exclude filters to mirror the v3.7 x86_64 main & community repos only.
I've read up on the various way to craft the rsync filters here:
https://superuser.com/questions/775140/how-can-i-rsync-a-set-of-subdirectories
https://injustfiveminutes.wordpress.com/2013/09/09/exclude-multiple-files-and-directories-with-rsync/
https://stackoverflow.com/questions/9952000/using-rsync-include-and-exclude-options-to-include-directory-and-file-by-pattern
But I haven't been able to hit on the correct pattern. Either rsync pulls down all of the v3.7 or none. I've been able to work around my lack of foo by way of cron jobbing two rsync's, one of main and one for community:
alpinerepo:/var/www/localhost/htdocs/alpine$ sudo rsync --archive --update --hard-links --delete \
--delete-after --delay-updates --timeout=600 --progress -vvv rsync://rsync.alpinelinux.org/alpine/v3.7/main/x86_64/* \
/var/www/localhost/htdocs/alpine/v3.7/main/x86_64/
alpinerepo:/var/www/localhost/htdocs/alpine$ sudo rsync --archive --update --hard-links --delete \
--delete-after --delay-updates --timeout=600 --progress -vvv rsync://rsync.alpinelinux.org/alpine/v3.7/community/x86_64/* \
/var/www/localhost/htdocs/alpine/v3.7/community/x86_64/
Thanks.
-Sean
Problem solved.. Rsync requires iteration of every level of the path: