Code: Select all
rsync -aAXv --delete --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","/home/<user>/shared/*","/home/<user>/ssd/*","/boot/efi/*"} / /mnt/

The main disadvantage I would see with rsync is that when a disk fails, anything accessing it falls on it's face until redirected to one of the rsync mirrors somehow. With RAID that would be entirely transparent to applications.pjp wrote:The main disadvantage I see with rsync would be the third copy and more reads causing extra wear on the source disk.
Immediate thought: Rsync is for backups and replication, RAID is for keeping things running until you can swap out failed hardware. Maybe I'm misconstruing your intent though.pjp wrote:Any thoughts
Have you tried using lvm snapshosts and restoring from those? I tested it briefly in a VM once. Seemed to work, but I needed to refine the process for repeatability. More specifically I think there was a minor issue with not reverting to the previous kernel.alamahant wrote:Rsync is perfect.
I have an rsync invocation in my daily update script,before the emerge part.
So in case something goes wrong with the state of the my machine post-update I just revert.
I use this formulaI mount an lvm partition in /mntCode: Select all
rsync -aAXv --delete --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","/home/<user>/shared/*","/home/<user>/ssd/*","/boot/efi/*"} / /mnt/
I love it.
:D
Other than human error, I'm not. but /path/dir/ vs /path/dir is really annoying. I'll have to come up with some means to test any updates to prevent blowing away the entire disk. That seems more fragile than RAID.Anon-E-moose wrote:I wouldn't worry about any problems related to rsync and longevity.
At least initially, I don't think that will be a big issue. Other than the rsync mirroring within the host, and possibly some automated syncs from clients, I don't think that is going to be a big problem. In some ways, that may be better. If monitoring isn't working well enough, the disk failure could be missed for a longer period of time. Or at least I'd like to think I'd notice the lack of response. But that would only be the case if the primary disk failed. Hmm. I'll have to think about that some more as it relates to monitoring. Good reminder.steve_v wrote:The main disadvantage I would see with rsync is that when a disk fails, anything accessing it falls on it's face until redirected to one of the rsync mirrors somehow. With RAID that would be entirely transparent to applications.
Others disagree, but I consider RAID to be the first backup. A type of "hot" backup. If you have a single disk and it fails, well, enterprise backup solutions often have holes in them. In that situation, RAID doesn't protect against accidental deletions or any other live activity such as a virus. That's where other backups come into play. As in any situation, "what is the risk you are protecting against"?steve_v wrote:Immediate thought: Rsync is for backups and replication, RAID is for keeping things running until you can swap out failed hardware. Maybe I'm misconstruing your intent though.
If what you want is [network]replication and/or snapshots, rather than uptime and redundancy, rsync is certainly the more flexible solution.
If you want all of the above in one solution there's always ZFS, which I hereby shamelessly plug yet again because it's awesome.

Yeah, I agree about the whole [dir|dir/] thing although I suppose its the way it is because you can make it do one of two things depending on the trailing /pjp wrote:Other than human error, I'm not. but /path/dir/ vs /path/dir is really annoying. I'll have to come up with some means to test any updates to prevent blowing away the entire disk. That seems more fragile than RAID.Anon-E-moose wrote:I wouldn't worry about any problems related to rsync and longevity.

Code: Select all
$ head root-link.log
.d..t...... ./
*deleting etc/portage/patches/media-video/makemkv/notify_linux.patch.14.2
*deleting etc/portage/patches/media-video/makemkv/configure.patch.14.6
*deleting etc/portage/patches/media-video/mkvtoolnix/qt5-m4.patch.old
*deleting etc/portage/patches/media-video/mkvtoolnix/qt5-configure.patch.old
*deleting etc/portage/patches/media-video/mkvtoolnix/qt-disable-dbus.patch
*deleting etc/portage/patches/media-video/mkvtoolnix/configure.patch.old
.d..t...... bin/
.d..t...... dev/--itemize-changes, -i output a change-summary for all updates
Bingo! I was about to post this. RAID is not a backup. RAID is a layer of data protection between backup cycles (or for speed).krinn wrote:i think you mistake raid for backup
mirroring is not made as a backup, but as safety to failure
the raw idea is having disk1,disk2 or disk3 to repair the array to match other disks content, this "might" be seen as backup solution, but it's not a real backup solution.
if you crush file1, file1 will be crushed on all disks, and there's no way you can recover file1, that's a backup task not a raid task
however unlike backup, if you were working on file1 and someone shoot your computer, backup will only help you recovering lastest saved version of file1, while raid will come to help to restore it to the freshest version possible.
or are you saying using raid in the backup source as a safety to backup errors?

I had once set up a system as the OP suggested, with the redundant disks being updated via rsync rather than being kept in sync via raid. It was very flexible. But I consider an on-machine backup to be no backup at all and always back everything to other hosts (i.e. backup servers). So given that a network backup must always be kept, everything on my work computers must be backed up elsewhere, the rsync'ed drive didn't take advantage of of its potential.steve_v wrote:The main disadvantage I would see with rsync is that when a disk fails, anything accessing it falls on it's face until redirected to one of the rsync mirrors somehow. With RAID that would be entirely transparent to applications ..... Rsync is for backups and replication, RAID is for keeping things running until you can swap out failed hardware ..... there's always ZFS, ... it's awesome.
Code: Select all
sent 624.67G bytes received 30.10M bytes 19.64M bytes/sec
total size is 707.03G speedup is 1.13krinn wrote:i think you mistake raid for backup
mirroring is not made as a backup, but as safety to failure
the raw idea is having disk1,disk2 or disk3 to repair the array to match other disks content, this "might" be seen as backup solution, but it's not a real backup solution.
if you crush file1, file1 will be crushed on all disks, and there's no way you can recover file1, that's a backup task not a raid task
however unlike backup, if you were working on file1 and someone shoot your computer, backup will only help you recovering lastest saved version of file1, while raid will come to help to restore it to the freshest version possible.
or are you saying using raid in the backup source as a safety to backup errors?
Naib wrote:Bingo! I was about to post this. RAID is not a backup. RAID is a layer of data protection between backup cycles (or for speed).
So the question is ... what do you want? redundancy or backup. Rsync is great for backup, especially over ssh to backup a headless for instance. For redundancy... sure RAID or one of hte fancier filesystem (zfs, btrfs)
To expand on that, some people don't consider a backup to be sufficient if it is: a) in the same machine, b) at the same site or c) within the same region.pjp wrote:Others disagree, but I consider RAID to be the first backup. A type of "hot" backup. If you have a single disk and it fails, well, enterprise backup solutions often have holes in them. In that situation, RAID doesn't protect against accidental deletions or any other live activity such as a virus. That's where other backups come into play. As in any situation, "what is the risk you are protecting against"?
I totally agree (and I expected you to get itpjp wrote:krinn wrote:i think you mistake raid for backup
mirroring is not made as a backup, but as safety to failure
the raw idea is having disk1,disk2 or disk3 to repair the array to match other disks content, this "might" be seen as backup solution, but it's not a real backup solution.
if you crush file1, file1 will be crushed on all disks, and there's no way you can recover file1, that's a backup task not a raid task
however unlike backup, if you were working on file1 and someone shoot your computer, backup will only help you recovering lastest saved version of file1, while raid will come to help to restore it to the freshest version possible.
or are you saying using raid in the backup source as a safety to backup errors?Naib wrote:Bingo! I was about to post this. RAID is not a backup. RAID is a layer of data protection between backup cycles (or for speed).
So the question is ... what do you want? redundancy or backup. Rsync is great for backup, especially over ssh to backup a headless for instance. For redundancy... sure RAID or one of hte fancier filesystem (zfs, btrfs)
As it relates to the thread title, the distinction was between redundant copies across two drives. One using RAID, the other using rsync. From an earlier reply:To expand on that, some people don't consider a backup to be sufficient if it is: a) in the same machine, b) at the same site or c) within the same region.pjp wrote:Others disagree, but I consider RAID to be the first backup. A type of "hot" backup. If you have a single disk and it fails, well, enterprise backup solutions often have holes in them. In that situation, RAID doesn't protect against accidental deletions or any other live activity such as a virus. That's where other backups come into play. As in any situation, "what is the risk you are protecting against"?
For points b) and c), the issue is of risk and cost. That's a value choice. However, while important, offsite redundant copies of (some) data are stale, likely by at least hours if not a day or more.
Which appears a good idea, but at end, it doesn't look goodNaib wrote:3) lsyncd. A daemon that uses inotify to sync a target/s directory from one place to another
AFAIR modern ethernet devices (like in 1Gbps and faster) use all 4 pairs, in both directions, at the same time.AFAIR you probably don't need crossover cables; if you have modern ethernet cards at either end, they'll sort the cable out themselves.
true,krinn wrote:Which appears a good idea, but at end, it doesn't look goodNaib wrote:3) lsyncd. A daemon that uses inotify to sync a target/s directory from one place to another
inotify report any modifitcations, which then will sync the delete/broken/bork file with the backup (aie), like mirroring, but you don't get mirroring speed
To me, the real solve is both : mirroring the datas with raid to protect them from local damage, and rsync those datas to another place.
the raid part need nothing, it will just works
the rsync will be slow only the first time, next time, it only copy the changes, which is fast (well, it's relative of course)
and the shutdown delay could be manage easy thru a script, ie: touch a file the script seek to know if he should shutdown after rsync or not.
Not ZFS send/receive?sitquietly wrote:ZFS was the perfect use for multiple data disks! Now I keep all of my working stuff on a zfs mirror and the backup on another computer via rsync.

You do it the right way. The backup server here needs to be upgraded to a zfs mirror ... soon.steve_v wrote:Not ZFS send/receive? ..... I too use rsync extensively, though in the other direction - rsync backups from several machines to a ZFS (RAIDZ6) fileserver...sitquietly wrote:ZFS was the perfect use for multiple data disks! Now I keep all of my working stuff on a zfs mirror and the backup on another computer via rsync.
I had thought that, but couldn't recall the specifics and if it included consumer devices. I also could recall if there were any power / damage concerns. I don't think there is, but the most recent occasion when I was wrong, I lost the original of the 3 4TB drives related to this thread. But, other than PoE, I can't recall any power issues between devices.Goverp wrote:AFAIR you probably don't need crossover cables; if you have modern ethernet cards at either end, they'll sort the cable out themselves.pjp wrote:...
Unfortunately I don't think I have any crossover cables, so I'm not looking forward to seeing how slow it goes over the network.
No more or no less than someone who doesn't know what they are doing being mistaken about other "backup" solutions that aren't what they expected. To be more explicit, yes, I do consider RAID an actual form of backup. And as with every other solution I have encountered, they all have areas they do not protect against. Don't forget the duct tape and bailing wire to assemble a solution for your needs.Naib wrote:just the usual google-foo and someone comes across something that implied RAID is synonymous with backup.
Not having considered the potential read performance you mentioned from RAID mirroring, I had mostly chosen the rsync option short of someone mentioning an "oh, yeah, I should go with RAID mirroring as opposed to rsync mirroring." The $ cost is not the factor as I had already decided to dedicate 1 or 2 disks to mirroring.Naib wrote:So the real question is do you want the expense (space, "complexity") of RAID or do you want the delay of rsync
This gets into the finer points of implementation. Overnight makes the most sense for the daily sync. But I think I'm going to aim for some degree of hourly and maybe 10 - 15 minute interval, somewhat like an applications autosave feature. I'll probably start with the hourly/nMinute snapshots from a workstation onto a dedicated disk within the workstation. Then have the nightly transfer to the system hosting the disks in question which are the subject of this thread. That's the starting point goal anyway. I suspect it will need to be tweaked.Naib wrote:The rsync could also be a 6h cronjob so it is little and often with a shutdown local service for a final sync
Well, yeah. Maybe.sitquietly wrote:You do it the right way. The backup server here needs to be upgraded to a zfs mirror ... soon. :)steve_v wrote:Not ZFS send/receive? ..... I too use rsync extensively, though in the other direction - rsync backups from several machines to a ZFS (RAIDZ6) fileserver...sitquietly wrote:ZFS was the perfect use for multiple data disks! Now I keep all of my working stuff on a zfs mirror and the backup on another computer via rsync.
Keep in mind, the most important won't be how much you will be able to save the current state of a file, but how much you will be able to recover it!pjp wrote:aim for some degree of hourly and maybe 10 - 15 minute interval, somewhat like an applications autosave feature.