> Craig wrote:

> I don't understand what having links for files in the backup
> gets you over having a copy of the files in the backup.

I get 31 days, each of which is a _full_ backup, in typically
about 2 times the drive space of ONE copy.

> Would that not make a backup worthless precisely because you
> would not have copies of the files on the backup?

Well, no.

Warning - the following is deep techy.  Proceed at your own risk.
*smiles*

On a EXT (2,3, or4) file system (and some others - not sure
which), a file in not referenced by it's name but by an
identifying number called an "inode"  

Next, a file name is actually the full-path.  That is the name of
the photo is not really "shiny-T123.jpg" but 
"/home/fmiser/photos/cars/mercedes/wagons/shiny-T123.jpg"

Then, that full filename is just a link to an inode.  And an inode
can have any number of links, each with a different (full)
filename - but for practical purposes, the link takes up no space.

Finally, "deleting" a file is more correctly called "unlinking" -
that is, removing a link.  And until _all_ the links are cut, the
inode is still "active" and the file spaces is not declared
available for re-use.

So at the time of backup, I use rsync to make a copy of all the
various files to a drive (or RAID array) in a directory called
"00".  Then I use "cp -al" to make a copy of "00" into, say "26"
(today).  Tomorrow, when "00" gets updated to match what is live,
files that have changed will have there links to inodes changed -
or cut.  But files that have not changed will retain the existing
inode link.  If a file hasn't changed over the whole 31 days (like
the shiny T123 photo) then it only takes up the space of ONE copy.

But, the real beauty is that each one of the 31 days is not an
incremental backup.  Each one is a full and complete copy of the
live file system on that day.  So if I point a file manager at any
one of those 31 days, what I see is all my files and all my
directories.  Yet because the inode is the same for all the days
that the file did not change, the whole 32 directories 
(00 through 31) typically take up about not more than 2 times the
space of just one day.

_______________________________________
http://www.okiebenz.com

To search list archives http://www.okiebenz.com/archive/

To Unsubscribe or change delivery options go to:
http://mail.okiebenz.com/mailman/listinfo/mercedes_okiebenz.com

Reply via email to