Solved

Question - rsync

Posted on 2002-05-24
4
297 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
Comment Utility
rsync -avHr ...
0
 
LVL 6

Author Comment

by:Zoplax
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks, the trailing slash was key.  
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
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.

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now