Re: [gentoo-user] USe rsync to backup RAID0 to RAID1?

2010-04-16 Thread Helmut Jarausch
On 16 Apr, Neil Bothwick wrote:
> On Thu, 15 Apr 2010 14:30:04 -0700, Mark Knecht wrote:
> 
>>I would like to back up a mounted RAID0 to a mounted RAID1.
> 
> The RAID makes no difference, because rsync works at the filesystem level.
> 
>>Would the following command be appropriate to backup /virdata on
>> RAID0 to /backups on RAID1?
>> 
>> rsync -avx /virdata/. /backups/.
> 
> Yes, although the use of -v makes it harder to see any errors that may
> occur.
>  
>>It appears that maybe the -a option wouldn't copy the links?
> 
> It does.

I don't think it copies hard links, as well.
Therefore I prefer the additional option -H 
Furthermore I add the -u option for not overriding files on the
destination which are newer.

Helmut.

-- 
Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany



Re: [gentoo-user] USe rsync to backup RAID0 to RAID1?

2010-04-16 Thread Florian Philipp
Am 16.04.2010 02:03, schrieb Neil Bothwick:
> On Thu, 15 Apr 2010 14:30:04 -0700, Mark Knecht wrote:
> 
>>I would like to back up a mounted RAID0 to a mounted RAID1.
> 
> The RAID makes no difference, because rsync works at the filesystem level.
> 
>>Would the following command be appropriate to backup /virdata on
>> RAID0 to /backups on RAID1?
>>
>> rsync -avx /virdata/. /backups/.
> 
> Yes, although the use of -v makes it harder to see any errors that may
> occur.
>  

You should also consider using --delete to cleanse your backup space
from deleted or renamed files.

>>It appears that maybe the -a option wouldn't copy the links?
> 
> It does.
>  
>>Also, how does rsync handle the backup if the RAID0 directory is
>> active and changing? Will it keep working until there are no
>> differences? Or does it read once and copy?
> 
> It reads once, and will generally produce an error if a file has changed
> between scanning and copying. Running rsync repeatedly until it returns
> a 0 status may be worth considering.
> 
> 

If you have an LVM on top of your RAID, you can also use LVM snapshots
for this. Of course, if a larger write action is going on, you still get
a half baked file.

Hope this helps,
Florian Philipp



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] USe rsync to backup RAID0 to RAID1?

2010-04-15 Thread Neil Bothwick
On Thu, 15 Apr 2010 14:30:04 -0700, Mark Knecht wrote:

>I would like to back up a mounted RAID0 to a mounted RAID1.

The RAID makes no difference, because rsync works at the filesystem level.

>Would the following command be appropriate to backup /virdata on
> RAID0 to /backups on RAID1?
> 
> rsync -avx /virdata/. /backups/.

Yes, although the use of -v makes it harder to see any errors that may
occur.
 
>It appears that maybe the -a option wouldn't copy the links?

It does.
 
>Also, how does rsync handle the backup if the RAID0 directory is
> active and changing? Will it keep working until there are no
> differences? Or does it read once and copy?

It reads once, and will generally produce an error if a file has changed
between scanning and copying. Running rsync repeatedly until it returns
a 0 status may be worth considering.


-- 
Neil Bothwick

Top Oxymorons Number 10: Computer security


signature.asc
Description: PGP signature


[gentoo-user] USe rsync to backup RAID0 to RAID1?

2010-04-15 Thread Mark Knecht
Hi,
   I would like to back up a mounted RAID0 to a mounted RAID1. I've
not used rsync before but it seems very well suited for this task. The
contents of the RAID0 are currently very simple - just some iso images
and two VMWare Windows XP installs. I don't see any links in there.
However my iso directory I did create a few links:

m...@c2stable ~ $ ls -al /virdata/isoImages/
total 1184672
drwxrwxrwx 2 mark users  4096 Apr 15 14:09 .
drwxrwxrwx 4 mark users  4096 Apr 14 14:57 ..
-rwxrwxrwx 1 mark users 667621376 Apr 15 08:36 Win98.iso
-rwxrwxrwx 1 mark users 544276480 Apr 14 15:16 WinXPHome.iso
lrwxrwxrwx 1 mark users 9 Apr 15 14:09 XP2_CD1 -> Win98.iso
lrwxrwxrwx 1 mark users13 Apr 15 14:08 XP2_CD2 -> WinXPHome.iso
m...@c2stable ~ $

   If those are going to cause problems I can likely get rid of them.

   Would the following command be appropriate to backup /virdata on
RAID0 to /backups on RAID1?

rsync -avx /virdata/. /backups/.

   It appears that maybe the -a option wouldn't copy the links?

   Longer term I want to figure out how to rotate backups but for now
I just want to get a copy safely to RAID1 before the end of the day.

   Also, how does rsync handle the backup if the RAID0 directory is
active and changing? Will it keep working until there are no
differences? Or does it read once and copy?

Thanks,
Mark