CP, Rsync or other?
-
Ubuntu 16.04
In the process of getting rid of my 8 year old ReadyNAS with its NFS share .
I need to copy (a complete duplicate would be nice) the data from the NFS share to local storage. Having limited Linux knowledge, I don't know if using rsync or cp is a better option?
I can script either one but would "rsync -av src dst" or "cp -pRu src dst" be best?
I would also like to have this copy only new files after the original copy is done because I will have both of them going until I my maintenance window on Sat. Then I will be able to change the app currently pointing to the NFS share.
-
rsync is basically always better.
-
Thanks. Much appreciated.
-
rsync is what handles the "some things have already been copied" algorithm.
-
@scottalanmiller said in CP, Rsync or other?:
rsync is what handles the "some things have already been copied" algorithm.
And it will make it much easier instead of copying all the files again.
-
@dbeato said in CP, Rsync or other?:
@scottalanmiller said in CP, Rsync or other?:
rsync is what handles the "some things have already been copied" algorithm.
And it will make it much easier instead of copying all the files again.
IT Rule of Thumb: RSYNC is always the right answer
-
Scott is right. When in dubt use rsync. Anyway cp is faster then the delta algo of rsync. Therefore the basic rule -if you care- should be: first time you copy go cp then always rsync. Even if cp fails you can restart with rsync.
But basically you do not bother and you go straight w/ rsync.