[opensuse] Another back-up question - Over & over again
Hello SuSE people, I have a new sata hard drive that is failing. I made a complete back-up using kdar of the drive. (To a separate spare drive) I have a dma number to return the drive. They will either replace it or repair it. When they get it they will destroy all data on the drive and when I receive it back it will be blank. No partitions, nothing. My question is: when I put the drive into service again will the backup restore everything? There were quite a few partitions on the drive. (primary & extended) I am thinking -NO. That I will have to reformat the drive and re-create the partitions as they were originally before I can restore the data. Am I correct in this assumption? I am pretty familiar with the YAST partitioner tool but wonder how I recreate the original partitions exactly? Or is it really necessary? I assume that there are no backup programs that actually re-create an entire blank drive. Bob S -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Bob S wrote:
My question is: when I put the drive into service again will the backup restore everything?
look at the backuip programm doc. you should have done this before...
I assume that there are no backup programs that actually re-create an entire blank drive.
of course they are, many, beginning by dd... but now it's a little too late :-(( anyway, the main thing is that you did a backup, many people don't :-)) jdd -- http://www.dodin.net Cécile, esthéticienne à Montpellier (à domicile) http://gourmandises.orangeblog.fr/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
jdd wrote:
Bob S wrote:
My question is: when I put the drive into service again will the backup restore everything?
look at the backuip programm doc. you should have done this before...
I assume that there are no backup programs that actually re-create an entire blank drive.
of course they are, many, beginning by dd...
Are you telling me that dd will take a blank hard drive, format it and duplicate the partions ? Like Mondo rescue would? Unfortunately I didn't have a Mondo backup. I had my regular Kdar original and incremental backups. I am thinking when the drive is returned (they will have formatted it) That I will have to format it again to ext3, and build my partitions exactly as they were, and I am not sure how I can duplicate it exactly. Bob S -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Saturday 2007-04-28 at 23:03 -0400, Bob S wrote:
of course they are, many, beginning by dd...
Are you telling me that dd will take a blank hard drive, format it and duplicate the partions ?
Yes.
Like Mondo rescue would?
No. dd is dumb: if you take the image of a 100 GB disk and dd it to a new 200 GB disk, you loose 100 GB.
I am thinking when the drive is returned (they will have formatted it) That I will have to format it again to ext3, and build my partitions exactly as they were, and I am not sure how I can duplicate it exactly.
Does it matter? Does it matter if a partition is a bit bigger or smaller, even if it is a diferent type? Linux doesn't care, it will work anyway. You can use the chance to change your partition types/sizes. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFGNGb6tTMYHG2NR9URAhfCAJ93k7ja2rkZXr/qa6ck1SIog7YbngCggkdA 14nQYZzqpKZ1+/oZDJuqtkA= =wA6K -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sunday 29 April 2007 05:35, Carlos E. R. wrote:
The Saturday 2007-04-28 at 23:03 -0400, Bob S wrote:
of course they are, many, beginning by dd...
Are you telling me that dd will take a blank hard drive, format it and duplicate the partions ?
Yes.
Like Mondo rescue would?
No.
dd is dumb: if you take the image of a 100 GB disk and dd it to a new 200 GB disk, you loose 100 GB.
OK Carlos, many thanks for that. Didn't realize that dd could do that. Thought it just copied files and directories to be restored to existing partitions.
I am thinking when the drive is returned (they will have formatted it) That I will have to format it again to ext3, and build my partitions exactly as they were, and I am not sure how I can duplicate it exactly.
Does it matter?
Does it matter if a partition is a bit bigger or smaller, even if it is a diferent type? Linux doesn't care, it will work anyway. You can use the chance to change your partition types/sizes.
Welllll....You're right. It doesn't really matter if dd (or others) recreate the drive as the original was. I was worried that everything would be just run together in one big partition with no space between/after the copied partitions. So, what you are saying is just restore and everything will be taken care of automagically, but if I want to, I can change partition sizes and restore to the newly created partitions on an individual basis. ????? Bob S. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Monday 2007-04-30 at 02:13 -0400, Bob S wrote:
dd is dumb: if you take the image of a 100 GB disk and dd it to a new 200 GB disk, you loose 100 GB.
OK Carlos, many thanks for that. Didn't realize that dd could do that. Thought it just copied files and directories to be restored to existing partitions.
dd donesn't know directories nor files. It copies from start to end everything, including the inodes, the partition table, bootsectors, empty space... everything in the range. Even the errors.
I am thinking when the drive is returned (they will have formatted it) That I will have to format it again to ext3, and build my partitions exactly as they were, and I am not sure how I can duplicate it exactly.
Does it matter?
Does it matter if a partition is a bit bigger or smaller, even if it is a diferent type? Linux doesn't care, it will work anyway. You can use the chance to change your partition types/sizes.
Welllll....You're right. It doesn't really matter if dd (or others) recreate the drive as the original was. I was worried that everything would be just run together in one big partition with no space between/after the copied partitions.
Carefull! It doesn't matter with tars (or dars). It does with dd.
So, what you are saying is just restore and everything will be taken care of automagically, but if I want to, I can change partition sizes and restore to the newly created partitions on an individual basis.
Certainly not automatically. You can recreate your partitions as you wish, even a diferent number of partitions - provided you use a restore procedure that copies directories and files, and that there is enough space. You are copying things from one filesystem to another filesystem structure, that will have the same /, /usr, /home, directories. The copy programs do not care how/where the real partitions below are. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFGNcIDtTMYHG2NR9URAvynAJ9yb6yvwWONyKLcJNUH5BATeg8yQQCdHqM1 cN4MbnzDThDnM4RYgJ8lJZo= =6LBU -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Carlos E. R. wrote:
dd is dumb: if you take the image of a 100 GB disk and dd it to a new 200 GB disk, you loose 100 GB.
for sure. but each system have the pros and cons. using cp or tar makes you at risk of losing a linked file or a "." (dot) invisible file. It's faily difficult to figure out what is important and what is not. dd (or similar) make a true backup: all is backed up, and the result can be gzipped for space saving (see also "partimage"). the only really safe system is a mix of the two, with in mind the fact than what is important is not backup but restore... use dd (even ddrescue if some disk sectors can be damaged). with the new drive: * partition the new drive. Get a temporary partition at least as big as the old drive. use dd to recover on this partition. Now all your data is available. Keep this as long as you can (several years is nice) * on an _other_ partition, copy all what you think is usefull. be strict, copy only the really necessary, if ever you need more it's already available. I use a similar sheme when I change distro. I frequently go on the old partition two years later, when I happen to use an old rarely used script :-) (or the old .signature I had two years ago...) jdd -- http://www.dodin.net Cécile, esthéticienne à Montpellier http://gourmandises.orangeblog.fr/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Mon 30 Apr 2007 11:33, jdd wrote:
using cp or tar makes you at risk of losing a linked file or a "." (dot) invisible file.
- over many years, TAR has worked faultlessly for me :- tar clf - . | ( umask 0; cd /mnt; tar xvf - ) [ where /mnt represents 'where you wish to send the stuff to' ] friendly greetings -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Monday 2007-04-30 at 13:33 +0200, jdd wrote:
Carlos E. R. wrote:
dd is dumb: if you take the image of a 100 GB disk and dd it to a new 200 GB disk, you loose 100 GB.
for sure.
but each system have the pros and cons.
using cp or tar makes you at risk of losing a linked file or a "." (dot) invisible file. It's faily difficult to figure out what is important and what is not.
Er... you should not loose any file nor link - if you use the right options. Everything is saved. You might loose extended attributes, though.
dd (or similar) make a true backup: all is backed up, and the result can be gzipped for space saving (see also "partimage").
It even stores empty space! It has the big dissadvantage of needing the destination be of the same size as the original - and that's a situation that doesn't always occur. A tgz is more versatile. When I do a dd, I mount the resulting image file in a loop, and use "mc" to copy over the "insides". I don't dd back the image. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFGNduetTMYHG2NR9URAlzyAJ9p4q7IpPU0+Xtmhvx4YX3kEY+PJACfWI+c NlOEfPgAZblxP9qm8ZYHMDY= =1H3I -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Carlos E. R. wrote:
When I do a dd, I mount the resulting image file in a loop, and use "mc" to copy over the "insides". I don't dd back the image.
it's a very good way, but not all systems allow easy loop mount (even if this is possible also on windows) jdd -- http://www.dodin.net Cécile, esthéticienne à Montpellier http://gourmandises.orangeblog.fr/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Monday 2007-04-30 at 14:31 +0200, jdd wrote:
Carlos E. R. wrote:
When I do a dd, I mount the resulting image file in a loop, and use "mc" to copy over the "insides". I don't dd back the image.
it's a very good way, but not all systems allow easy loop mount (even if this is possible also on windows)
I loop mounted ext2, ext3, reiserfs, xfs, iso9something... applied fsck to recover badly damaged filesystems... works fine. I haven't yet found a filesystem type which can not be loopmounted. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFGNeQNtTMYHG2NR9URAmMxAJ4+4OV82sicb9F720JTLlbHqSmvUACeNRfW CmGhxrr6XVC76Fi/vH84xxA= =Q9D7 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Carlos E. R. wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
The Monday 2007-04-30 at 14:31 +0200, jdd wrote:
Carlos E. R. wrote:
When I do a dd, I mount the resulting image file in a loop, and use "mc" to copy over the "insides". I don't dd back the image. it's a very good way, but not all systems allow easy loop mount (even if this is possible also on windows)
I loop mounted ext2, ext3, reiserfs, xfs, iso9something... applied fsck to recover badly damaged filesystems... works fine. I haven't yet found a filesystem type which can not be loopmounted.
I was not thinking of _file_ system, but _operating_ system, namely windows 98 :-) using fsck on a loop mounted file system is a very good idea jdd -- http://www.dodin.net Cécile, esthéticienne à Montpellier http://gourmandises.orangeblog.fr/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Monday 2007-04-30 at 15:53 +0200, jdd wrote:
Carlos E. R. wrote:
When I do a dd, I mount the resulting image file in a loop, and use "mc" to copy over the "insides". I don't dd back the image. it's a very good way, but not all systems allow easy loop mount (even if this is possible also on windows)
I loop mounted ext2, ext3, reiserfs, xfs, iso9something... applied fsck to recover badly damaged filesystems... works fine. I haven't yet found a filesystem type which can not be loopmounted.
I was not thinking of _file_ system, but _operating_ system, namely windows 98 :-)
But what do I care if windows can not loopmount? That's their problem, not mine :-P
using fsck on a loop mounted file system is a very good idea
This way we can try reconstructing a difficult problem. If fsck fails one way, I make another copy and retry. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFGNfhDtTMYHG2NR9URAgWEAJ4gpG2q1rgeiwSmGOlWSey7w64HzwCePbEq Ahq3LqxLNYP5y1sibgiDY9w= =7VVs -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Monday 30 April 2007 05:05, Carlos E. R. wrote:
The Monday 2007-04-30 at 13:33 +0200, jdd wrote:
Carlos E. R. wrote:
dd is dumb: if you take the image of a 100 GB disk and dd it to a new 200 GB disk, you loose 100 GB.
for sure.
but each system have the pros and cons.
using cp or tar makes you at risk of losing a linked file or a "." (dot) invisible file. It's faily difficult to figure out what is important and what is not.
Er... you should not loose any file nor link - if you use the right options. Everything is saved. You might loose extended attributes, though.
The --preserve option of cp (along with the -d and -R) using value "all" plus the --attributes option will include extended attributes options and allow 100% faithful duplication. Cp can also create sparse files, in circumstances when that might matter: --sparse=WHEN control creation of sparse files
...
-- Cheers, Carlos E. R.
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Randall R Schulz wrote:
Cp can also create sparse files (...)
what I meaned was that one don't always know if it's a good idea to copy links/masked files. it may be a very bad idea to do so in some circomstances, when you don't know how will the backup restored. of course if you know exacltly what you do, you can copy anything. but who know always :-(( just one year ago, I managed to crash a backup, ending with original files with zero length and no backup at all!!! I never really understood was arise, but I think I had cross links (links from a partitio to an other and vice-versa) now I double check :-)) jdd -- http://www.dodin.net Cécile, esthéticienne à Montpellier http://gourmandises.orangeblog.fr/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Monday 2007-04-30 at 16:55 +0200, jdd wrote:
I never really understood was arise, but I think I had cross links (links from a partitio to an other and vice-versa)
It is safe to copy "the link" but not the file that the link is pointing to. On the other hand, when doing a backup, you might find out that the backup is full of links which are not saved elsewhere... so one has got to be careful. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFGNjHLtTMYHG2NR9URAiuUAJ9xZhrrTzMfpPwYmK5kx0KREbWUowCeJqQN ZayMrrQEKLgEsfp9fasfUPE= =NHqv -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Monday 30 April 2007 11:13, Carlos E. R. wrote:
The Monday 2007-04-30 at 16:55 +0200, jdd wrote:
I never really understood was arise, but I think I had cross links (links from a partitio to an other and vice-versa)
It is safe to copy "the link" but not the file that the link is pointing to. On the other hand, when doing a backup, you might find out that the backup is full of links which are not saved elsewhere... so one has got to be careful.
It's important to distinguish hard links from symbolic links. Hard links are fundamentally restricted from ever crossing file system / device / volume boundaries. This is because all the hard links to a file are co-equal. It's not that one is "the file" and others are "links." This kind of link is the reference from a directory entry to an inode and takes the form of a simple integer index in the inode table. Because it has this form, in which the device / file system volume is implicit and must be equal to the one on which the directory entry resides. Manually created hard links cannot refer to directories. The only hard links to directories are those created automatically when directories are created or moved (specifically, the link from the parent to the directory, the "." entry in the directory and the ".." entries in all immediate sub-directories). Symbolic links _are_ asymmetric. A symbolic link is quite distinct from the entity to which it refers (which may by any kind of file system entity, including directories). A symbolic link is just a plain file that contains a substitute file name (relative or absolute) to use when the symlink is accessed. Symbolic links may cross file system boundaries because there referents (the thing to which they point) have no implicit component or aspect other than the directory in which the symlink resides in the case that the symlink's value is a relative path name.
-- Cheers, Carlos E. R.
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Monday 2007-04-30 at 11:27 -0700, Randall R Schulz wrote:
It is safe to copy "the link" but not the file that the link is pointing to. On the other hand, when doing a backup, you might find out that the backup is full of links which are not saved elsewhere... so one has got to be careful.
It's important to distinguish hard links from symbolic links.
Of course, I was talking about symbolic links. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFGNksftTMYHG2NR9URAkCwAJ9cIVK08oiKwAstRfyVNMjKCk7lOACcDc7K vTZuYTn3rDSoVMq3sKlIokE= =qiac -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Monday 2007-04-30 at 07:14 -0700, Randall R Schulz wrote:
Er... you should not loose any file nor link - if you use the right options. Everything is saved. You might loose extended attributes, though.
The --preserve option of cp (along with the -d and -R) using value "all" plus the --attributes option will include extended attributes options and allow 100% faithful duplication.
True, but I was thinking of tar and friends.
Cp can also create sparse files, in circumstances when that might matter:
I think some p2p programs use them when retrieving files in random chunks. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFGNjJAtTMYHG2NR9URAuIuAJ97Ng+1INfvVaEXm3eN6Nl7zHh4zQCgluzy +BEtmxJPQJ31ofMPmJ0/V+k= =V0QQ -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Monday 30 April 2007 11:15, Carlos E. R. wrote:
The Monday 2007-04-30 at 07:14 -0700, Randall R Schulz wrote:
Er... you should not loose any file nor link - if you use the right options. Everything is saved. You might loose extended attributes, though.
The --preserve option of cp (along with the -d and -R) using value "all" plus the --attributes option will include extended attributes options and allow 100% faithful duplication.
True, but I was thinking of tar and friends.
Yes. And I'm pointing out that that gap can be closed by using cp.
...
-- Cheers, Carlos E. R.
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Monday 2007-04-30 at 11:28 -0700, Randall R Schulz wrote:
"all" plus the --attributes option will include extended attributes options and allow 100% faithful duplication.
True, but I was thinking of tar and friends.
Yes. And I'm pointing out that that gap can be closed by using cp.
And... and how are you going to make a backup in one archive, compressed, using cp? Because we are talking about backups, and the OP used kdar. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFGNkvBtTMYHG2NR9URApCZAJ9G68S6NnO+IQ9OT/EH7eh7+r7/6ACffEFZ BXa172L2dRTnrpyKrnFwMdM= =9kl0 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Monday 30 April 2007 13:04, Carlos E. R. wrote:
The Monday 2007-04-30 at 11:28 -0700, Randall R Schulz wrote:
"all" plus the --attributes option will include extended attributes options and allow 100% faithful duplication.
True, but I was thinking of tar and friends.
Yes. And I'm pointing out that that gap can be closed by using cp.
And... and how are you going to make a backup in one archive, compressed, using cp? Because we are talking about backups, and the OP used kdar.
I thought the task was to replicate a file system from one disk (or partition) to another?
-- Cheers, Carlos E. R.
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Monday 2007-04-30 at 13:19 -0700, Randall R Schulz wrote:
And... and how are you going to make a backup in one archive, compressed, using cp? Because we are talking about backups, and the OP used kdar.
I thought the task was to replicate a file system from one disk (or partition) to another?
Actually, from one disk to the same disk after repair - but I don't know which was (is) the intermediate media. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFGNoBmtTMYHG2NR9URApARAKCTowi4gAhX8KLLdv/+5CJ9ZjEx7ACfWoFS F9jlytzHGdJNH1fCiA9d8VA= =leun -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Monday 30 April 2007 19:48, Carlos E. R. wrote:
The Monday 2007-04-30 at 13:19 -0700, Randall R Schulz wrote:
And... and how are you going to make a backup in one archive, compressed, using cp? Because we are talking about backups, and the OP used kdar.
I thought the task was to replicate a file system from one disk (or partition) to another?
Actually, from one disk to the same disk after repair - but I don't know which was (is) the intermediate media.
The intermediate media was another larger hard drive with sufficient space. I reserve that space specifically for backups. Uhhhhh...Further back in this thread there was discussion about hard links and symlinks. How does one identify hard links and differentiate them from symlinks. I remember seeing them displayed as little arrows when using ls -l Can you see them in MC? You guys are something else. you can't imagine the wealth of knowledge I have learned here. (Too bad I can't remember it all !) It's great when a thread like this turns into a long discussion. Thanks to all of you for being here and spreading your knowledge. Bob S. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Monday 30 April 2007 20:35, Bob S wrote:
On Monday 30 April 2007 19:48, Carlos E. R. wrote:
The Monday 2007-04-30 at 13:19 -0700, Randall R Schulz wrote:
...
I thought the task was to replicate a file system from one disk (or partition) to another?
Actually, from one disk to the same disk after repair - but I don't know which was (is) the intermediate media.
The intermediate media was another larger hard drive with sufficient space. I reserve that space specifically for backups.
Uhhhhh...Further back in this thread there was discussion about hard links and symlinks. How does one identify hard links and differentiate them from symlinks. I remember seeing them displayed as little arrows when using ls -l Can you see them in MC?
In the output of the "ls" command when invoked with the "-l" option, symlinks are displayed with an 'l' as the first character of the line. (Other possibilities are 'd': directory; 's': Unix-domain socket; 'p': named pipe; 'b': block device; 'c': character device). If the ls command is invoked with the '-l' and '-F' options (equivalently, "-lF"), then a type-signifying character distinct from those mentioned above is appended as the last character, immediately following the file name. Those characters are: '/': directory; '=': socket; '|': named pipe. Symbolic links are shown with an arrow ("->") and the target of the link. If invoked with -F but not -l, symlinks are shown with a trailing '@'. As I mentioned, hard links are not special entities. All directory entries are hard links. The "ln" command just creates "extra" hard links to the same file system entity as one referred to by an existing directory entry. As such, they're not specially signified in the output of any command.
... Thanks to all of you for being here and spreading your knowledge.
No problemo.
Bob S.
Randall schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Monday 2007-04-30 at 22:40 -0700, Randall R Schulz wrote:
As I mentioned, hard links are not special entities. All directory entries are hard links. The "ln" command just creates "extra" hard links to the same file system entity as one referred to by an existing directory entry. As such, they're not specially signified in the output of any command.
Well, yes, they are: cer@nimrodel:~/tmp/pp> touch pepe cer@nimrodel:~/tmp/pp> ln pepe jose cer@nimrodel:~/tmp/pp> touch juan cer@nimrodel:~/tmp/pp> l total 12 drwxr-xr-x 2 cer users 39 2007-05-01 12:03 ./ drwxr-xr-x 12 cer users 4096 2007-03-06 23:41 ../ - -rw-r--r-- 2 cer users 0 2007-05-01 12:03 jose - -rw-r--r-- 1 cer users 0 2007-05-01 12:03 juan - -rw-r--r-- 2 cer users 0 2007-05-01 12:03 pepe ^ Above, "jose" is a hardlink to "pepe", whereas "juan" is a lone file; the number "2" is the number of links. cer@nimrodel:~/tmp/pp> stat jose pepe juan File: `jose' Size: 0 Blocks: 0 IO Block: 4096 regular empty file Device: 30bh/779d Inode: 25670212 Links: 2 Access: (0644/-rw-r--r--) Uid: ( 500/ cer) Gid: ( 100/ users) Access: 2007-05-01 12:03:12.860372862 +0200 Modify: 2007-05-01 12:03:12.860372862 +0200 Change: 2007-05-01 12:03:22.321055722 +0200 File: `pepe' Size: 0 Blocks: 0 IO Block: 4096 regular empty file Device: 30bh/779d Inode: 25670212 Links: 2 Access: (0644/-rw-r--r--) Uid: ( 500/ cer) Gid: ( 100/ users) Access: 2007-05-01 12:03:12.860372862 +0200 Modify: 2007-05-01 12:03:12.860372862 +0200 Change: 2007-05-01 12:03:22.321055722 +0200 File: `juan' Size: 0 Blocks: 0 IO Block: 4096 regular empty file Device: 30bh/779d Inode: 25670217 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 500/ cer) Gid: ( 100/ users) Access: 2007-05-01 12:03:30.331940407 +0200 Modify: 2007-05-01 12:03:30.331940407 +0200 Change: 2007-05-01 12:03:30.331940407 +0200 The dificult thing is to find out who the other hardlinked name is. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFGNxHatTMYHG2NR9URAoj3AJ9LKEJ7mELtAtNJ+uKOEff1OdwC6QCfc8Wr PcsWFmssbaF3QtmmUIigdf8= =EbOR -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tuesday 01 May 2007 03:09, Carlos E. R. wrote:
The Monday 2007-04-30 at 22:40 -0700, Randall R Schulz wrote:
As I mentioned, hard links are not special entities. All directory entries are hard links. The "ln" command just creates "extra" hard links to the same file system entity as one referred to by an existing directory entry. As such, they're not specially signified in the output of any command.
Well, yes, they are:
All hard links to a given entity are co-equal. Unlike symlinks, where the target of the link and the link itself are very different things. No one hard link is "the" file with others being somehow different or secondary. Thus, they're not special. All file system entities (their inodes, actually) have link counts, it's a reference-counting mechanism used by the kernel to decide when an inode may be deallocated. Note that "ls" has a "-i" option, which adds inode numbers to the information displayed for each entity it lists.
...
The difficult thing is to find out who the other hardlinked name is.
In the old days, we had "ncheck" which would exhaustively search a file system for all directory entries that refer to a given inode number, trace their parentage back to the root and print that resulting name. Nowadays (where it appears ncheck is gone), one can use the "-samefile" option of find: -samefile name File refers to the same inode as name. When -L is in effect, this can include symbolic links.
-- Cheers, Carlos E. R.
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Tuesday 2007-05-01 at 06:47 -0700, Randall R Schulz wrote:
As such, they're not specially signified in the output of any command.
Well, yes, they are:
All hard links to a given entity are co-equal. Unlike symlinks, where
I know that. I'm just pointing out that "ls -l" does report the existence and number of hardlinks for a file.
The difficult thing is to find out who the other hardlinked name is.
In the old days, we had "ncheck" which would exhaustively search a file system for all directory entries that refer to a given inode number, trace their parentage back to the root and print that resulting name.
Nowadays (where it appears ncheck is gone), one can use the "-samefile" option of find:
Good to know. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFGN0yEtTMYHG2NR9URAvVBAJ9IXnIs0zZFq1NUegkK8pBQME1ePACfa80D gynmh6phpbiPKoemx9N/NV4= =SIjk -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tuesday 01 May 2007 07:19, Carlos E. R. wrote:
...
I know that. I'm just pointing out that "ls -l" does report the existence and number of hardlinks for a file.
The key point is that a hard link is one and the same thing as a directory entry. Thus, not special.
...
-- Cheers, Carlos E. R.
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Carlos E. R. wrote:
I am thinking when the drive is returned (they will have formatted it) That I will have to format it again to ext3, and build my partitions exactly as they were, and I am not sure how I can duplicate it exactly.
Does it matter?
Does it matter if a partition is a bit bigger or smaller, even if it is a diferent type? Linux doesn't care, it will work anyway. You can use the chance to change your partition types/sizes.
Well, Linux doesn't care when the partition is big enough - greater or equal to the size of filesystem. When the partition gets even a tiny bit smaller than the filesystem, you've got a problem, however you won't experience it until you fill up the disk. Once the disk is almost full, you'll get complaints about "attempt to access beyond end of device" or similar. And you end'up with corrupted filesystem.... Cheers, Petr -- Petr "Tosuja" Klíma Mail: tosuja@tosuja.info Web: www.tosuja.info ICQ: 52057532 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Monday 2007-04-30 at 12:38 +0200, Petr Klíma wrote:
Does it matter?
Does it matter if a partition is a bit bigger or smaller, even if it is a diferent type? Linux doesn't care, it will work anyway. You can use the chance to change your partition types/sizes.
Well, Linux doesn't care when the partition is big enough - greater or equal to the size of filesystem. When the partition gets even a tiny bit smaller than the filesystem, you've got a problem, however you won't experience it until you fill up the disk. Once the disk is almost full, you'll get complaints about "attempt to access beyond end of device" or similar. And you end'up with corrupted filesystem....
That's true only if the backup/restore is made with dd, ie, it is an image - and the OP used dar, sot that's a non issue. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFGNcq1tTMYHG2NR9URAkfvAJ4vH7bnPxPwSCZPbTYI8jzXswMMvACeON6H mtW+BuriFh5sGA5FePbBJXo= =nYl6 -----END PGP SIGNATURE-----
Bob S wrote:
I assume that there are no backup programs that actually re-create an entire blank drive.
Yes there is: Mondo Rescue. Packages for OpenSuSE are even provided ;-) HTH Cheers. Bye. Ph. A. -- *Philippe Andersson* Unix System Administrator IBA Particle Therapy | Tel: +32-10-475.983 Fax: +32-10-487.707 eMail: pan@iba-group.com <http://www.iba-worldwide.com> The contents of this e-mail message and any attachments are intended solely for the recipient (s) named above. This communication is intended to be and to remain confidential and may be protected by intellectual property rights. Any use of the information contained herein (including but not limited to, total or partial reproduction, communication or distribution of any form) by persons other than the designated recipient(s) is prohibited. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free. Ion Beam Applications does not accept liability for any such errors. Thank you for your cooperation.
participants (7)
-
Bob S
-
Carlos E. R.
-
jdd
-
Petr Klíma
-
Philippe Andersson
-
Randall R Schulz
-
riccardo35@gmail.com