Solved

Question - rsync

Posted on 2002-05-24
4
302 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

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…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

696 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