<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>https://wiki.webko.net.ua/index.php?action=history&amp;feed=atom&amp;title=Local_repo_mirror</id>
	<title>Local repo mirror - История изменений</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.webko.net.ua/index.php?action=history&amp;feed=atom&amp;title=Local_repo_mirror"/>
	<link rel="alternate" type="text/html" href="https://wiki.webko.net.ua/index.php?title=Local_repo_mirror&amp;action=history"/>
	<updated>2026-05-04T02:37:06Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://wiki.webko.net.ua/index.php?title=Local_repo_mirror&amp;diff=534&amp;oldid=prev</id>
		<title>Sol: Новая страница: «Категория:ArchLinux  == Синхронизация с основными репами ==  &lt;syntaxhighlight lang=&quot;bash&quot;&gt; crontab -l /usr/local/sbin/sy…»</title>
		<link rel="alternate" type="text/html" href="https://wiki.webko.net.ua/index.php?title=Local_repo_mirror&amp;diff=534&amp;oldid=prev"/>
		<updated>2017-04-26T14:25:27Z</updated>

		<summary type="html">&lt;p&gt;Новая страница: «&lt;a href=&quot;/index.php?title=%D0%9A%D0%B0%D1%82%D0%B5%D0%B3%D0%BE%D1%80%D0%B8%D1%8F:ArchLinux&quot; title=&quot;Категория:ArchLinux&quot;&gt;Категория:ArchLinux&lt;/a&gt;  == Синхронизация с основными репами ==  &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt; crontab -l /usr/local/sbin/sy…»&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Категория:ArchLinux]]&lt;br /&gt;
&lt;br /&gt;
== Синхронизация с основными репами ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
crontab -l&lt;br /&gt;
/usr/local/sbin/sync_archlinux.sh&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#################################################################################################&lt;br /&gt;
### It is generally frowned upon to create a local mirror due the bandwidth that is required.&lt;br /&gt;
### One of the alternatives will likely fulfill your needs.&lt;br /&gt;
### REMEMBER:&lt;br /&gt;
###   * Bandwidth is not free for the mirrors. They must pay for all the data they serve you&lt;br /&gt;
###       =&amp;gt; This still applies although you pay your ISP &lt;br /&gt;
###       =&amp;gt; There are many packages that will be downloaded that you will likely never use&lt;br /&gt;
###       =&amp;gt; Mirror operators will much prefer you to download only the packages you need&lt;br /&gt;
###   * Really please look at the alternatives on this page:&lt;br /&gt;
###       https://wiki.archlinux.org/index.php?title=Local_Mirror&lt;br /&gt;
### If you are ABSOLUTELY CERTAIN that a local mirror is the only sensible solution, then this&lt;br /&gt;
### script will get you on your way to creating it. &lt;br /&gt;
#################################################################################################&lt;br /&gt;
&lt;br /&gt;
# Configuration&lt;br /&gt;
SOURCE='rsync://mirror.23media.de/archlinux/'&lt;br /&gt;
#SOURCE='rsync://archlinux.bln-ua.net/archlinux/'&lt;br /&gt;
DEST='/srv/mirror/archlinux'&lt;br /&gt;
BW_LIMIT='500'&lt;br /&gt;
REPOS='core extra community multilib iso community-staging community-testing gnome-unstable kde-unstable multilib-staging multilib-testing multilib pool staging testing lastsync lastupdate'&lt;br /&gt;
RSYNC_OPTS=&amp;quot;-rtlH --delete-after --delay-updates --safe-links --max-delete=1000&amp;quot;&lt;br /&gt;
LCK_FLE='/var/run/mirror/repo-sync.lck'&lt;br /&gt;
&lt;br /&gt;
PATH='/usr/bin'&lt;br /&gt;
&lt;br /&gt;
# Make sure only 1 instance runs&lt;br /&gt;
if [ -e &amp;quot;$LCK_FLE&amp;quot; ] ; then&lt;br /&gt;
        OTHER_PID=$(cat $LCK_FLE)&lt;br /&gt;
        echo &amp;quot;Another instance already running: $OTHER_PID&amp;quot;&lt;br /&gt;
        exit 1&lt;br /&gt;
fi&lt;br /&gt;
echo $$ &amp;gt; &amp;quot;$LCK_FLE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
for REPO in $REPOS ; do&lt;br /&gt;
        echo &amp;quot;Syncing $REPO&amp;quot;&lt;br /&gt;
        rsync $RSYNC_OPTS ${SOURCE}/${REPO} ${DEST}&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
# Cleanup&lt;br /&gt;
rm -f &amp;quot;$LCK_FLE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Сервер rsync ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cat /etc/xinetd.d/rsync&lt;br /&gt;
&lt;br /&gt;
service rsync&lt;br /&gt;
{&lt;br /&gt;
        disable                 = no&lt;br /&gt;
        socket_type             = stream&lt;br /&gt;
        port                    = 873&lt;br /&gt;
        protocol                = tcp&lt;br /&gt;
        wait                    = no&lt;br /&gt;
        user                    = root&lt;br /&gt;
        server                  = /usr/bin/rsync&lt;br /&gt;
        server_args             = --daemon&lt;br /&gt;
        log_on_success  += HOST DURATION&lt;br /&gt;
        log_on_failure  += HOST&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sol</name></author>
	</entry>
</feed>