rsync syntax question
Kevin Raber
ktr at mtu.edu
Mon Apr 25 17:14:14 UTC 2005
On Mon, 25 Apr 2005, Scott Mertens wrote:
> I have been told that rsync is much better than dump to copy one drive
> to another. I want to copy sda and sda1 to sdb Both drives on one
> RHEL4 machine. I thought I would use the syntax of
>
> "rsync -avz / /mnt/Backup"
>
> Hers is a problem I'm thinking about, /mnt/Backup is a second drive
> mounted (SDB). I am thinking that as rsync copies the tree - when it
> gets to the mounted drive it is copying from /mnt/Backup to /mnt/Backup.
> This it seems to me would put rsync into an infinite loop?
>
> This second drive is only for backup purposes, so if it can be excluded
> from being backed up, thats OK.
>
> Does the syntax look OK, and will it copy both sda and sda1?
>
> Thanks
>
I think you just need to use the exclusion available with rsync:
--exclude=PATTERN
to make sure you avoid the loop.
Kevin Raber
MTU
More information about the Redhat-install-list
mailing list