?
Solved

Question - rsync

Posted on 2002-05-24
4
Medium Priority
?
306 Views
Last Modified: 2013-12-16
I used the rsync utility recently in an effort to xfer data from one FreeBSD 4.2 box to another.

This is the info which resulted.

/usr/home/me/rsync-2.5.5/rsync -avH -e ssh targetmachine: /backup_drive

root@targetmachine's password:********
receiving file list ... done
.history
wrote 62 bytes read 16054 bytes 346.58 bytes/sec
total size is 2772931 speedup is 172.06


I thought I'd used the parameters necessary to copy the entire hard drive, all files and subdirectories (about 1.2 gigs worth) but it only copied this much.

What gives??  Why didn't it copy the entire set of files...?
0
Comment
Question by:Zoplax
  • 2
4 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7034195
rsync -avHr ...
0
 
LVL 6

Author Comment

by:Zoplax
ID: 7038363
Ohhh, man could I have just forgotten that one parm?  

Will try that and let you know.
0
 
LVL 3

Accepted Solution

by:
tibori earned 400 total points
ID: 7052520
Actually(according to man rsync) the -a option includes the -r option:
 
-a, --archive
              This  is  equivalent to -rlptgoD. It is a quick way
              of saying you want recursion and want  to  preserve
              almost everything.

The problem is you're not specifying the source dir to copy from. By default then this will take the home directory of the connecting user and copy that. You want to do:
rsync -avzH -e ssh targetmachine:/ /backup_drive (notice the / after targetmachine) I also would add -z for compression during transfer.
0
 
LVL 6

Author Comment

by:Zoplax
ID: 7158145
Thanks, the trailing slash was key.  
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month15 days, 4 hours left to enroll

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question