Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Copy or rsync command

Tags:

cp

rsync

The following command is working as expected...

cp -ur /home/abc/* /mnt/windowsabc/ 

Does rsync has any advantage over it? Is there a better way to keep to backup folder in sync every 24 hours?

like image 308
shantanuo Avatar asked Jun 14 '11 05:06

shantanuo


People also ask

What is the difference between copy and rsync command?

So bottom line is rsync is for large data, and cp is for smaller local copying. (MB to small GB range). When you start getting into multiple GB or in the TB range, go with rsync. And of course network copies, rsync all the way.

Does rsync copy or move?

Rsync (Remote Sync) is the most commonly used command for copying and synchronizing files and directories remotely as well as locally in Linux/Unix systems.

Is rsync better than cp?

Compared to the cp command, rsync also allows to copy files and directories to local and remote locations, as we've discussed in this RSync backup tutorial. The above command will copy file1. txt from your current working directory to /mnt directory. If the destination file exists, rsync will overwrite it.

What is rsync command used for?

Rsync is a command-line tool for copying files and directories between local and remote systems that should be in every Linux sysadmin's toolbox.


1 Answers

Rsync is better since it will only copy only the updated parts of the updated file, instead of the whole file. It also uses compression and encryption if you want. Check out this tutorial.

like image 126
marchica Avatar answered Oct 01 '22 17:10

marchica