Question: I got a local repository in `/var/www/html/centos/7` directory. In here, all rpm packages from centos are downloaded.
I will create a crontab for updating my local repository every 1 week or sth.

I want to learn that does `repocreate --update` do this? Or should I download all the packages from centos repo again?

If I should download the packages from centos repo, is there a way to skip the downloaded packages (they're in `/centos/7` directory as I mentioned) and download just the new (updated) packages from centos?

UPDATE

I have found the solution but it's not working for me. I created a new directory centos7/repo and download some files to check if the rsync --ignore-existing will work. But whenever I run the below command, I got an error

```
failed to connect to ftp.linux.org.tr (193.140.100.100): Connection timed out (110)

rsync: failed to connect to ftp.linux.org.tr (2001:a98:11::100): Network is unreachable (101)

rsync error: error in socket IO (code 10) at clientserver.c(125) [Receiver=3.1.2]

```

The command is:

```
rsync -avz --ignore-existing rsync://ftp.linux.org.tr/centos/7/os/x86_64/ /var/www/html/centos7/repo/

```

I tried other mirrors as well from <https://centos.org/download/mirrors/> (there are rsync location in this site as well). But none of them worked. Can anybody validate that rsync mirrors does work? Probably I can't go through firewall with port 873.

Is there anyway that I can use this rsync through port 80 or is there another way to accomplish this task? (I tried zsync but it needs a zsync file.)

Answer: 
repoquery queries every package in repository that you configured for your system and after that give the list to xargs to download all packages (new ones not existing ones)with repotrack to your server.

```
repoquery -a | xargs repotrack -a x86_64 -p .

```

The rsync solution also works if you haven't got any firewall rules that restrict the rsync daemon port. 

```
rsync -avz --ignore-existing rsync://ftp.linux.org.tr/centos/7/os/x86_64/ /var/www/html/centos7/repo/

```
you can try the following mirror which is supporting rsync as well

<http://mirror.nl.leaseweb.net/centos/>