Solved

Question - rsync

Posted on 2002-05-24
4
299 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 100 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
is my large folder zipped corrupted 4 78
CENTOS DHCP Server / PXE/TFTP 14 156
Impact of disabling SMB v1 on Mac and Linux clients 4 548
Check for Linux process in script 7 49
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
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.

831 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