# I want rsync only download new files and keep old files



## mfaridi (Dec 21, 2010)

I install Arch i686 in home and in home I do not have internet connection , so at work I use FreeBSD 8.1 AMD64 and  I download all packages I need with this command


```
rsync -avrt --bwlimit=58 rsync://mirror.datacenter.by/arch//extra/os/any/ /home/ddd/i686/
```

and move them to home and then copy them to


```
/var/cache/pacman/arch
```

and install packages with pacman
after two days , I run this command


```
rsync -avrt --bwlimit=58 rsync://mirror.datacenter.by/arch//extra/os/any/ /home/ddd/i686/
```

and I see rsync get last packages again and use many Bandwidth
how I tell rsync only download new files and keep old files


----------



## mix_room (Dec 21, 2010)

mfaridi said:
			
		

> ```
> rsync -avrt --bwlimit=58 rsync://mirror.datacenter.by/arch//extra/os/any/ /home/ddd/i686/
> ```
> 
> ...



Are you sure that it is actually downloading all the files, or is it only processing them? 
Try adding the 
	
	



```
--progress
```
 switch to the command to see in more detail


----------



## mfaridi (Dec 21, 2010)

mix_room said:
			
		

> Are you sure that it is actually downloading all the files, or is it only processing them?
> Try adding the
> 
> 
> ...



rsync download again and I see it use more bandwidth


----------



## rusty (Dec 21, 2010)

What was wrong with Xyne's "Powerpill Portable" scripts, they look like the prefect solution to your issue. https://bbs.archlinux.org/viewtopic.php?id=110136&p=1


----------



## mix_room (Dec 21, 2010)

Try the 
	
	



```
-c
```
 option


----------



## phoenix (Dec 21, 2010)

mfaridi said:
			
		

> I install Arch i686 in home and in home I do not have internet connection , so at work I use FreeBSD 8.1 AMD64 and  I download all packages I need with this command
> 
> 
> ```
> ...



Don't move the files.  Copy them.

If you remove the files from /home/ddd/i686/, then the next time rsync runs it has nothing to compare to, and will download everything again.  rsync needs the old files to be in place, in order to know what's new/different.


----------



## mfaridi (Dec 22, 2010)

phoenix said:
			
		

> Don't move the files.  Copy them.
> 
> If you remove the files from /home/ddd/i686/, then the next time rsync runs it has nothing to compare to, and will download everything again.  rsync needs the old files to be in place, in order to know what's new/different.



I just copy it , and do not move them 
I use these option too 

```
-c -u --progress
```
but it happen again , I use this method for make localrepo for Fedora and OpenSuse and I do not have this problem 
can this happen , because of packages in Arch mirror modify and put mirror again , with new time and date ?


----------

