Problem with local mirror syncing

Hi mens! And sorry, my English is bad.
I rewrite script from here for syncing mirror for my local network.
That's what happened http://ix.io/1aK or http://paste.pocoo.org/raw/263591/ or permanent http://ix.io/user/atommixz
It support http (maybe ftp?) mirroring other repos. Using lftp for it.
#!/bin/bash
# The script to sync a local mirror of the Arch Linux repositories and ISOs
# Copyright (C) 2007 Woody Gilk <[email protected]>
# Modifications by Dale Blount <[email protected]>
# and Roman Kyrylych <[email protected]>
# and Vadim Gamov <[email protected]>
# and Aleksey Frolov <[email protected]>
# Licensed under the GNU GPL (version 2)
USECOLOR=yes
. /etc/rc.d/functions
# Filesystem locations for the sync operations
SYNC_HOME="/home/mirror"
SYNC_LOGS="$SYNC_HOME/logs"
SYNC_FILES="$SYNC_HOME/files"
SYNC_LOCK="$SYNC_HOME/mirrorsync.lck"
SYNC_REPO=(core extra community multilib iso archlinuxfr catalyst)
#SYNC_REPO=(archlinuxfr catalyst)
typeset -A REPO_URL
REPO_URL=(
[archlinuxfr]='http://repo.archlinux.fr/x86_64'
[catalyst]='http://catalyst.apocalypsus.net/repo/catalyst/x86_64'
#SYNC_SERVER=distro.ibiblio.org::distros/archlinux
SYNC_SERVER=mirror.yandex.ru::archlinux
RATE_LIMIT=50 # in kb/s
TIME_OUT=5 # in sec
# Set the format of the log file name
# This example will output something like this: sync_20070201-8.log
#LOG_FILE="pkgsync_$(date +%Y%m%d-%H).log"
LOG_FILE="pkgsync_$(date +%Y%m%d).log"
#Watchdog part (time in seconds of uninterruptable work of script)
# Needed for low-speed and/or unstable links to prevent
# rsync hunging up.
# New instance of script checks for timeout, if it occurs
# it'll kill previous instance, in elsecase it'll exit without
# any work.
WD_TIMEOUT=10800
# Do not edit the following lines, they protect the sync from running more than
# one instance at a time
if [ ! -d $SYNC_HOME ]; then
printhl "$SYNC_HOME does not exist, please create it, then run this script again."
exit 1
fi
if [ -f $SYNC_LOCK ];then
OPID=`head -n1 $SYNC_LOCK`;
TIMEOUT=`head -n2 $SYNC_LOCK|tail -n1`;
NOW=`date +%s`;
if [ "$NOW" -ge "$TIMEOUT" ];then
kill -9 $OPID;
fi
MYNAME=`basename $0`;
TESTPID=`ps -p $OPID|grep $OPID|grep $MYNAME`;
if [ "$TESTPID" != "" ];then
printhl "exit";
exit 1;
else
rm $SYNC_LOCK;
fi
fi
echo $$ > "$SYNC_LOCK"
echo `expr \`date +%s\` + $WD_TIMEOUT` >> "$SYNC_LOCK"
# End of non-editable lines
# Create the log file and insert a timestamp
touch "$SYNC_LOGS/$LOG_FILE"
printhl "Starting sync on $(date --rfc-3339=seconds)" | tee -a "$SYNC_LOGS/$LOG_FILE"
for repo in ${SYNC_REPO[@]}; do
repo=$(echo $repo | tr [:upper:] [:lower:])
printhl "Syncing $repo" | tee -a "$SYNC_LOGS/$LOG_FILE"
NEXT=false
for i in ${!REPO_URL[*]}; do
if [ $i = $repo ]; then
mkdir -p "$SYNC_FILES/$repo"
cd "$SYNC_FILES/$repo"
lftp -c "\
set xfer:log no; \
set net:limit-rate $[RATE_LIMIT * 1000]; \
mirror \
--delete \
--only-newer \
--verbose=3 \
${REPO_URL[$repo]}" | tee -a "$SYNC_LOGS/$LOG_FILE"
date --rfc-3339=seconds > "$SYNC_FILES/$repo.lastsync"
NEXT=true
#sleep $TIME_OUT
fi
done
if $NEXT; then continue; fi
rsync -rtvHh \
--bwlimit=$RATE_LIMIT \
--no-motd \
--delete-after \
--delete-excluded \
--prune-empty-dirs \
--delay-updates \
--copy-links \
--perms \
--include="*/" \
--include="latest/*x86_64.iso" \
--include="latest/*sum*.txt" \
--include="archboot/latest/*.iso" \
--include="os/x86_64/*" \
--exclude="*" \
$SYNC_SERVER/$repo "$SYNC_FILES" | tee -a "$SYNC_LOGS/$LOG_FILE"
# Create $repo.lastsync file with timestamp like "2007-05-02 03:41:08+03:00"
# which may be useful for users to know when the repository was last updated
date --rfc-3339=seconds > "$SYNC_FILES/$repo.lastsync"
# Sleep 5 seconds after each repository to avoid too many concurrent connections
# to rsync server if the TCP connection does not close in a timely manner
sleep $TIME_OUT
done
# Insert another timestamp and close the log file
printhl "Finished sync on $(date --rfc-3339=seconds)" | tee -a "$SYNC_LOGS/$LOG_FILE"
printsep >> "$SYNC_LOGS/$LOG_FILE"
# Remove the lock file and exit
rm -f "$SYNC_LOCK"
unset REPO_URL
exit 0
But I'm have problem. If I'm run
sudo pacman -Syu
on my server, it's fine work.
[atommixz@fileserver ~]$ date; sudo pacman -Syu; echo "------"; date; sudo pacman -Syu
Сбт Сен 18 19:55:47 MSD 2010
:: Синхронизируются базы данных пакетов...
core 35,7K 14,2M/s 00:00:00 [#############################################################] 100%
extra 465,9K 189,3M/s 00:00:00 [#############################################################] 100%
community 383,1K 198,6M/s 00:00:00 [#############################################################] 100%
archlinuxfr не устарел
:: Запускается полное обновление системы...
нечего выполнять
[atommixz@fileserver ~]$ date; sudo pacman -Syu
Сбт Сен 18 19:55:48 MSD 2010
:: Синхронизируются базы данных пакетов...
core не устарел
extra не устарел
community не устарел
archlinuxfr не устарел
:: Запускается полное обновление системы...
нечего выполнять
But if I'm try it on my desktop, it work wrong. Always reget base. But it is updated properly.
[atommixz@relentless ~]$ date; sudo pacman -Syu; echo "------"; date; sudo pacman -Syu
Сбт Сен 18 19:58:42 MSD 2010
:: Синхронизируются базы данных пакетов...
core 35,7K 34,0M/s 00:00:00 [#############################################################] 100%
extra 465,9K 58,7M/s 00:00:00 [#############################################################] 100%
community 383,1K 57,9M/s 00:00:00 [#############################################################] 100%
multilib 19,3K 34,7M/s 00:00:00 [#############################################################] 100%
archlinuxfr 18,6K 42,6M/s 00:00:00 [#############################################################] 100%
catalyst 2,2K 67,7M/s 00:00:00 [#############################################################] 100%
:: Запускается полное обновление системы...
нечего выполнять
Сбт Сен 18 19:58:43 MSD 2010
:: Синхронизируются базы данных пакетов...
core 35,7K 34,0M/s 00:00:00 [#############################################################] 100%
extra 465,9K 58,7M/s 00:00:00 [#############################################################] 100%
community 383,1K 64,8M/s 00:00:00 [#############################################################] 100%
multilib 19,3K 48,9M/s 00:00:00 [#############################################################] 100%
archlinuxfr 18,6K 38,9M/s 00:00:00 [#############################################################] 100%
catalyst 2,2K 55,5M/s 00:00:00 [#############################################################] 100%
:: Запускается полное обновление системы...
нечего выполнять
What am I doing wrong?

I'm not sure, but your script may be too old.  That is, it may no longer work.
I believe that creating a local mirror is discouraged due to the high bandwidth needed to do that.
Perhaps you could try this instead.

Similar Messages

  • Problem with connecting and syncing   (quicktime.qts)

    Hi,
    I have a problem with connecting and syncing my Iphone to itunes.
    iphone alone on PC -> uploading files (fotos) is possible
    itunes starts normaly, if iphone is not conected.
    if i connect iphone after starting itunes, or if i start itunes after connecting iphone i get an itunes-error with message:
    AppName: itunes.exe AppVer: 9.0.2.25 ModName: quicktime.qts
    ModVer: 7.65.17.80 Offset: 00909a47
    i test different things...
    - used another USB-port
    - used another PC
    - used macbook of my wife instead PC
    - deinstalled and new installed of itunes (older and newer versions) folow tutorials of apple
    - use another USB-Cable...
    I'm resigned, Please help me..
    Tom

    AppName: itunes.exe AppVer: 9.0.2.25 ModName: quicktime.qts
    In this context, that can sometimes indicate trouble with a content file on the phone (or Touch).
    Do you have any podcasts stored on the iPhone at the moment? If so, if you delete them from the phone, can you connect to iTunes without the error?

  • Problem with local editing after update to SP13

    Hallo,
    we have updated our Enterprise Portla 7.00 to SP13. Now many user have Problem with local editing. The error message is "The download of the document fail".
    I know that every PC needs the "Docservice" Active X component installed. The "Docservice" is also installed.
    At my PC theres only this problem with "html" documents.
    What could be the problem. ?
    Please help.
    Many thanks
    Ronald

    We found that there is a problem with the Docservice Active X Component.
    If we work in a deeper folder there is a problem with the length of the url. I changed the TEMP Setting
    "Setting a different TEMP directory:                                     
    In cases that it is problematic to use the standard %TEMP% directory,   
    setting the environment variable SAPKM_USER_TEMP pinpointing to a       
    corresponding directory path (e.g.                                      
    X:\SHARES\USERS\xxx\CheckedOutDocuments) will be also supported. If the 
    access to that directory fails the standard %TEMP% directory will be    
    used as fallback."
    I used "C:\TEMP" and now it works.......  but this cant be the solution....
    thans Ronald

  • Problem with Local Intranet in IE 11

    Hi
    We are experiencing a strange problem with Local Intranet in IE 11. We have a public company site which has been put into the Local Intranet site. The site contains content from 3 internal sites, which of course are part of Local Intranet per default.
    Sometimes when I refresh the public company site I receive a security warning because IE says it's between zones.
    Why? :-)
    Might this be an issue because the 3 internal sites aren't hardcoded into Local Intranet through policy?
    Lasse
    /Lasse

    Hi Lasse,
    I would like to know if this issue happened in all user's IE browser.
    Meanwhile,please post the screenshot here
    so that we can help you analyze the issue.
    Regards,
    Kelvin Xu
    TechNet Community Support

  • Problem with Local DCs View in NWDS 7.0

    Hi!
    I' ve got a problem with Local DCs view in NWDS: None of the standard-DCs (BI_MMR, BI_UDI, CAF a.s.o.) can be expanded and show their content. I already reinstalled IDE, but without success.
    Has anybody got an idea?
    Thanks a lot in advance!
    Regards,
    Thomas

    Hi,
    This is due to some files missed in Local development.
    Let me know Are you able to see <b>.confdef, .syncdb</b> and <b>buildvariant.config </b> files under Local Developement.
    If you are not able to see, UnInstall your NWDS, Remove Local developement under .dtc folder, then Re-Install NWDS.
    Hope this will help you.
    Thanks & Regards
    Vasundhara

  • Problem with Local DCs View in NWDS

    Hi!
    I' ve got a problem with Local DCs view in NWDS: None of the standard-DCs (BI_MMR, BI_UDI, CAF a.s.o.) can be expanded and show their content. I already reinstalled IDE, but without success.
    Has anybody got an idea?
    Thanks a lot in advance!
    Regards,
    Thomas

    Your setup might be incomplete: The SAR file extraction creates very long paths on your filesystem. If you do not extract to the rootfolder of disk, chances are the paths become too long and the installation exits, without any warning.
    If this is not the cause of your problem, check if the .dcdef files for the local DCs (plugin com.sap.tc.ap if I'm correct) were copied during installation.

  • I am having problems with my ipod syncing all of my videos to my ipod from my itunes playlist, it will only sync about half even though they are all checked

    i am having problems with my ipod syncing all of my videos to my ipod from my itunes playlist, it will only sync about half even though they are all checked

    I assume there is more than ample space remaining on your iPod to hold all the videos?  Are you getting any error messages during the sync process?
    Do all of these videos play okay in iTunes?  Is the sync only checked songs and videos option enabled from under the iPod's Summary tab?
    What other setting do you have enabled from under the iPod's video configuration tab in iTunes?
    B-rock

  • Anyone else haveing a problem with appointments not syncing, duplicate appointments when syncing with Outlook? Also, noticed that my primary SMTP disappeared, and I had to re-establish to send e-mail. Apple tech support was worthless.

    Anyone else haveing a problem with appointments not syncing, duplicate appointments when syncing with Outlook? Noticed the problem a couple of days ago.
    Also, noticed that my primary SMTP disappeared, and I had to re-establish to send e-mail.
    Apple tech support was worthless on both issues.

    Hi I am also in the UK, but not with Tiscali and am having the exact same problems. I can also send with wifi, but not 3G. I have tried amending all sorts of settings, including those above and amending the smtp server to the settings for my provider, but all to no avail.
    It is thoroughly frustrating, as I cannot send emails unless I have wifi access.
    Any further suggestions would be very welcome.

  • I have a iphone 5, purchased dec 2013. Had no problems with downloads and syncing until yesterday. I updated to the latest 7.1.1 and now my purchased ringtones have bern deleted from ....Try providing more room for peoples questions ...

    I have a iphone 5, purchased dec 2013. Had no problems with downloads and syncing until yesterday. I updated to the latest 7.1.1 and now my purchased ringtones have bern deleted from my library and my phone, Where are they ????
    I have gone to download again and told i can purchase them again
    But there is no option to download all ready purchased items..
    Can you provide an explanation and solution .

    Are you using the same Apple id as used to originally purchase them
    and are you using iTunes on a PC/Mac

  • Problem with locale

    I have a problem with locale.
    When I put the locale command in the console.
    This is the output:
    locale: Cannot set LC_CTYPE to default locale: No such file or directory
    locale: Cannot set LC_MESSAGES to default locale: No such file or directory
    locale: Cannot set LC_ALL to default locale: No such file or directory
    LANG=en
    LC_CTYPE="en"
    LC_NUMERIC="en"
    LC_TIME="en"
    LC_COLLATE="en"
    LC_MONETARY="en"
    LC_MESSAGES="en"
    LC_PAPER="en"
    LC_NAME="en"
    LC_ADDRESS="en"
    LC_TELEPHONE="en"
    LC_MEASUREMENT="en"
    LC_IDENTIFICATION="en"
    LC_ALL=
    Whats the problem?

    Here's mine, just for comparison:
    locale.gen
    en_GB.UTF-8 UTF-8
    en_GB ISO-8859-1
    en_US.UTF-8 UTF-8
    locale.conf
    LANG=en_GB.UTF-8 UTF-8
    Output of locale:
    LANG=en_GB.UTF-8
    LC_CTYPE="en_GB.UTF-8"
    LC_NUMERIC="en_GB.UTF-8"
    LC_TIME="en_GB.UTF-8"
    LC_COLLATE="en_GB.UTF-8"
    LC_MONETARY="en_GB.UTF-8"
    LC_MESSAGES="en_GB.UTF-8"
    LC_PAPER="en_GB.UTF-8"
    LC_NAME="en_GB.UTF-8"
    LC_ADDRESS="en_GB.UTF-8"
    LC_TELEPHONE="en_GB.UTF-8"
    LC_MEASUREMENT="en_GB.UTF-8"
    LC_IDENTIFICATION="en_GB.UTF-8"
    LC_ALL=
    Have you also run the command sudo locale-gen?
    Last edited by clfarron4 (2013-09-04 00:04:26)

  • Printing Problem with Local printer

    Hi Experts,
    My clients has installed new HP LaserJet p2015dn printer in SAP.
    I have used the  font "HELVE" in my sap script, when i take the printout with HP leser jet 1022N it gives correct printout. where as when i take the printout with local (HP LaserJet p2015dn) Printer it give the printout in unreadbale format (no spaces between each alphabet)
    I can change the font and solve this proble but i have used same font in many forms and the client wish to take the printout with newly installed printer only.
    Please help.
    Thanks
    Ganesh

    dear ganesh ,
        whn client installed new Hp lajer jet  printer , for that client dowload some text file , is is not download in computer thats y  smartforms not coming properly
    so pls contact client administrator and download all this files which is supported that new printer . thn problem will solve
    regards ,
    nikhil.

  • Problem with iTunes and sync

    I have a problems in syncing:
    iTunes always show me when I was open iTunes as:
    "iTunes cannot sync information with iPhone because syncing has been disabled on this computer."
    But my setting is enable the syncing
    Can anyone help me please ??

    Hi,
    Try enabling syncing from the iSync applications preferences window. Just check Enable syncing on this computer.
    If the issue persists, try resting the syncing history in the same preference window as described here: http://support.apple.com/kb/TA23030
    -Jason

  • Problem with iTunes and sync'n Contacts

    I'm a new user to the iPod and iTunes in general. Unfortunately I've encountered a few problems with putting contacts on my iPod. I have the new video 5th generation iPod and Microsoft Outlook 2003, however when I try and sync the contacts to the iPod - iTunes closes with the message 'iTunes has encountered a problem and needs to close'. The error signature offset is '35f76ad2'. I have absolutely no idea what this means.
    I have tried manually moving the contacts from Outlook to my iPod but this doesn't take the pictures with it.
    I also tried installing a version of iTunes prior to 7.0.0 until I realised my iPod could only use version 7 or later.
    Can someone please help - even if it's just contact information for Apple to help me out!

    Restore your iPhone from a backup of your iPhone. You can restore from either your iCloud or iTunes backup depending upon what you want to do and what backups you have. To restore see:
    iOS: How to back up

  • Problems with iPhone 3G sync

    When I try to sync my iPhone 3G the sync never completes. I mean I have let it run for excess of 48 hours just to see. Also the applied changes ie, photos, music playlists etc are not being applied. I s this a problem with iTunes or with my phone. I'm posting here because I believe it to be a problem with my phone as my iPods and my wifes phone sync fine. any help here would be most appreciated.

    my phone actually does 'sync' it just never completes the job. each time I go throught the process some things are actually done as for as changes I am trying to implement but others are not. the acytual syunc process just never stops, like I said before it will say 'sync in progress' for literally days without completing.

  • Problem with Local Interfaces (WSAD 5)

    I built an Entity Bean with Local Interface and a Remote Interface (apperently they both have the same JNDI name in WSAD)
    and when I look up for the name from other Session Bean (same EJB group) and I try to cast it to the local interface there is a classCastException.............
    HELP ME

    Nidhi
    I had the same problems as you that went away. If you have both remote and local interfaces defined, and your remote inerface can be accessed via JNDI lookup using (say) "ejb/sessionbean/stateless/HelloHome", then you can access the local intercafe using "local:ejb/ejb/sessionbean/stateless/HelloHome".
    The URL http://localhost:9080/UTC/initialize?port=2809 is very useful to browse the JNDI tree. Just expand "Local EJB beans" and position your mouse over the item of interest. The JNDI lookup name will echo in the bottom (solid) frame of the browser. The only problem is that the jndilookup name will appear (mistakenly) as local:/ejb/ejb/stateless......, just get rid of the first forward-slash to make it look like local:ejb/ejb/stateless....
    Hope this helps
    Somnath

Maybe you are looking for

  • In SMQ2 files are not processing automatically

    Hi I'm uploading the data using XI to ECC system. I'm facing a problem with a Q in ECC. Each and every file when I upload it is getting stuck in ECC. So, I will have to go to SMQ2 in ECC and unlocking it and activating it and refreshing. I also confi

  • Trying to get round the default render kit's use of tables

    Apologies if this is a simple question - I'm solid with Java and HTML but I'm new to JSF. The default render kit uses tables a lot, eg for the +<h:selectOne>+ tag. This is not something that I like - I want a radio button group to be rendered as a +<

  • Time Machine reports, "backup failed." What do I do?

    Time Machine reports, "backup failed." What should I do?

  • Impact of Project Profile

    Dear All, User has selected wrong project profile. I need to know what are the implications or impact of wrong project profile on the open project. Thanks PM

  • Adobe reader x, and win7, sha-1 instead of sha-256

    Good afternoon, i have a problem similar to that posted at http://forums.adobe.com/message/3707345 i try to sign the pdf (enable for signing with adobe livecycle ES, Right Managements) but it always is signed with hash algorithm SHA-1 The hardware ve