DISCUSSION: Using rsync to mirror data between servers
LinuxAnswers DiscussionThis forum is to discuss articles posted to LinuxAnswers.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I use rsync to back up a live server to another server. I use this command
rsync -e ssh -avz --delete-after user@liveserver:/home/httpd /home
then I am prompted to enter a password. Now when I enter the same command in the crontab nothing happens. I think the problem is may requre a password to connect.
Now How do I enter the password in to the crontab so that this process is automated? The command in the crontab I us is; 0 * * * * rsync -e ssh -avz user@liveserver:/home/httpd /home 2>&1 > /var/log/hourly_backup.log
Oh yes, that is an issue. Usually you need to enter a password and cron of course, cannot do that.
Some crazy idea would be to put the password into a file and read it from there, but this is a terrible way to work.
Instead, you can create a passwordless loging for the machine that makes the backup to the other. Look up the HOWTO about ssh, it is described there, worked for me like a charm.
In essence you generate a key on the backup machine and then include that key into the "trusted keys" file in the other machine, so it lets it login without a password.
Atomicx, it is posible, just generate the private in the server(see the howto, man pages), then copy it to the backup sever, even if you have more than one backup severs, just copy the same key to all severs.
(newbie). I just used the rsync successfully to an external NDAS. My question is whether I am foolish to think this is a truly useful backup, and if it is, does one just rsync the files back? I speak to the case of having backed up a particular folder (non OS application files) off the server, and then later needing that older/intact version off the NDAS to recreate/fix same on server. Thanks.
hi can anyone tell me the complete procedure how to setup the rsync server . i am very new to linux and somehow managed to write some script to take backup locally using rsync.
now i need to take the backup remotely.please help me to do this one