Jeff Stacey wrote:
On Fri, 2006-03-11 at 10:28 -0800, Bbt Lists wrote:
Mark Schoonover wrote:
> Maybe this is something I should write up in more detail. The > entire system runs on just a couple of shell scripts, rsync, and > Perl program to mail out logs.... > > HTH > Mark
A day late, but ran into some problems with blogspot. The article is posted at: http://marks-tech-pages.blogspot.com - titled Linux Based Poor Man's SAN.
Let me know what you think!
Thanks!
Mark Schoonover IS Manager American Geotechnical V: 858-450-4040 - F: 714-685-3909 - C: 858-472-3816
"Stop the Earth!! I want off!!"
On Sun, 5 Nov 2006 14:43:38 -0800 , you wrote:
Jeff Stacey wrote:
On Fri, 2006-03-11 at 10:28 -0800, Bbt Lists wrote:
Mark Schoonover wrote:
>> Maybe this is something I should write up in more detail. The >> entire system runs on just a couple of shell scripts, rsync, and >> Perl program to mail out logs.... >> >> HTH >> Mark
A day late, but ran into some problems with blogspot. The article is posted at: http://marks-tech-pages.blogspot.com - titled Linux Based Poor Man's SAN.
Bit of a Linux newbie so I may have misunderstood the below (but am interested in a similar but much smaller scale setup for my home network) - planning on using tape but this looks more inviting (I could use tape for long term permanent backup).
You wrote "Hardlinks are key to this backup strategy. Using cp -al creates hardlinks to files, and this simple command is what does all the heavy lifting for daily and weekly backups. Wikipedia has a very good explanation on how hardlinks work. In a nutshell, when there's a hardlink pointing to a file from the hourly directory, to a file in the current directory, and that current file gets deleted, all the links that point to that now deleted current file gets the file data 'pushed' back towards all the links. I'll have to think how to explain this better."
Do you mean that the hourly files are written when created, the hardlink for the daily doesn't actually copy the file (simply makes a link), but if the file is set to be deleted from it's location (because it's gone from the server) then it is actually moved so that it still exists in the daily backup but is removed from the hourly? --
Peter Crighton
On Mon, 2006-11-06 at 18:42 +0000, Peter Crighton wrote:
You wrote "Hardlinks are key to this backup strategy. Using cp -al creates hardlinks to files, and this simple command is what does all the heavy lifting for daily and weekly backups. Wikipedia has a very good explanation on how hardlinks work. In a nutshell, when there's a hardlink pointing to a file from the hourly directory, to a file in the current directory, and that current file gets deleted, all the links that point to that now deleted current file gets the file data 'pushed' back towards all the links. I'll have to think how to explain this better."
Do you mean that the hourly files are written when created, the hardlink for the daily doesn't actually copy the file (simply makes a link), but if the file is set to be deleted from it's location (because it's gone from the server) then it is actually moved so that it still exists in the daily backup but is removed from the hourly? --
Think of all directory entries as links. The real entries that map disk space to files are inodes and links are names pointing to the inodes. There can be any number - including 0 - of links to an inode. The space is not released for re-use until the link count goes to 0 and no process has the file open. So hardlinks are just multiple names pointing to the same data, and the data doesn't go away until the last name is removed. Note that this only works as a backup if the original filename is removed. If it is overwritten or truncated instead, all links now point to the changed version.