Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Server - Debian Desktop - Linux Mint
Posts: 219
Rep:
SCP or rsync?
What do you use for transferring files from one to another server?So far i was using scp command,but i see rsync function basically same,except i heard how rsync copies files in realtime.Also is it possible to insert password in command(for automated backup purposes) or that can be arranged only by using ssh keys?
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197
Rep:
Each has its own place. You haven't described your situation. I use a variety of tools depending on the situation. If I'm just looking to copy one or a few files or a small directory, I'll use scp, just because it is so simple and works. If I'm copying a large directory that's going to take a long time and I don't want to lose time if there are any problems or failures, I'll do it with rsync. Then I can just do the same command again, and it will clean up any differences much more quickly. There are also times when I'll use gnutar or ufsdump (I'm on Solaris systems mostly). I also have some scripts that pipe the results of a find to cpio.
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197
Rep:
If you are backing up databases, simple copies or rsync may not give you consistent backups. Take a look at http://dev.mysql.com/doc/refman/5.1/...p-methods.html. You could dump your databases to a different directory and then back that up.
Also, without additional thought and effort, using scp or rsync to simply copy a directory out will leave you with only one backup. If you happen to pull some kind of snafu late in the evening, and then your backup runs, when you get up in the morning, you will find that both your primary data and your backup are snafu'd (because the backup copied the messed up stuff and overwrote the backup with it).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.