rsync help

Associate
Joined
16 Jan 2006
Posts
970
Location
North Wales
Hi

am looking to backup a web server online to a home server at home using rsync (data only)

i have run the following command

rsync -v -e 'ssh -p 2222 root@"IP":/root/home/clickit/*' '/home/backup/' (change the IP to the ip of my server)

i get the following back, i was waiting for a prompt to enter the server password really.


building file list ... done
drwx------ 98 2019/02/12 16:40:12 .
-rw------- 79 2019/02/12 16:40:12 .bash_history
-rw-r--r-- 18 2018/10/30 17:07:12 .bash_logout
-rw-r--r-- 193 2018/10/30 17:07:12 .bash_profile
-rw-r--r-- 231 2018/10/30 17:07:12 .bashrc
drwxrwxr-x 6 2019/02/12 16:38:04 sheldon

sent 140 bytes received 371 bytes 1,022.00 bytes/sec
total size is 521 speedup is 1.02

All it has done on the backup rsync server is created a folder called sheldon - sheldon is the host name of the web server.

Any idea's what i am doing wrong?

Thank You
 
rsync -zavP -e 'ssh -p 2222' root@IP:/root/home/clickit/ /home/backup/

Sorry for the late reply only just got back on to this project.

That worked perfectly thank you. what is the zavp -e for? new to rsync sorry


I use

Code:
rsync -r -t -v -P -e ssh /source user@server/destination

This is what I use to do a backup from my desktop to server. I use ssh with a key file as saves messing with passwords for this particular task.


Do you know where i can learn about key files?
 
Sorry to come back to this after such a while but i have 1 more question if anyone can help -

rsync -zavP -e 'ssh -p 2222' root@IP:/root/home/ /home/backup/

When i do this it asks for the root password of the server. I want to turn this in to a cron job but it will stop on the password screen wouldnt it? i want to set up a cron for 3 times aday but how can i get around it asking for the root password? do i add something to the command?
 
Back
Top Bottom