Recopying /home/myusername and getting it to work by copy and paste

2012-08-15 Thread Merciadri Luca
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

I've got a backup of /home on some external HDD. Let us
consider that one of my internal HDDs, more precisely the one containing
/home, fails. I then need to replace it. If I manage to make the
external HDD internal, and change /etc/fstab consequently, would it work
without any issues? When should I change /etc/fstab? Would the path to
the `new internal HDD' (the one which was precedently external) be the
same as the path to the old one (the one that failed)?

Thanks.
- -- 
Merciadri Luca
See http://www.student.montefiore.ulg.ac.be/~merciadri/
- -- 

As soon as a man is born, he begins to die.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 http://mailcrypt.sourceforge.net/

iEYEARECAAYFAlArWEQACgkQM0LLzLt8MhzkGACdGWmbXmQ2DEEXETrf8mLIg1IE
xckAoJyE5/n+lUJOmsg4Wc9TQHeUXyZF
=ktMk
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/87y5lg8trv.fsf@merciadriluca-station.MERCIADRILUCA



Re: Recopying /home/myusername and getting it to work by copy and paste

2012-08-15 Thread Gary Dale

On 15/08/12 04:05 AM, Merciadri Luca wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

I've got a backup of /home on some external HDD. Let us
consider that one of my internal HDDs, more precisely the one containing
/home, fails. I then need to replace it. If I manage to make the
external HDD internal, and change /etc/fstab consequently, would it work
without any issues? When should I change /etc/fstab? Would the path to
the `new internal HDD' (the one which was precedently external) be the
same as the path to the old one (the one that failed)?

Thanks.
- -- 
You can replace the drive without problems if the external drive 
contains a direct copy of the failed internal drive. However, that is 
probably not exactly the case. You need to be more explicit about what 
kind of backup the external drive contains.


In the simplest case, let's assume that it contains a direct copy of the 
/home folders (i.e. if /home contains a, b  c, then the external drive 
would have a, b  c at the root level and not /home/a, /home/b  
/home/c). In this case, simply replacing the drive may be sufficient.


However, if you are using UUIDs in /etc/fstab then you will need to 
replace the failed drive's UUID with the UUID for the internal unit. If 
you are using device names (e.g. /dev/sdb1) then you may not need to 
make any changes.


If you are using some other form of backup, then you will need to 
convert it to a set of folders in the external drive, one for each user 
account and with the correct user ids, etc..


As for the difference between internal and external, external drives 
normally are regular drives in a different case (usb or eSATA instead of 
IDE or SATA). Taking the drive out of the case and putting into an 
internal drive bay is usually quite simple - it just requires a screwdriver.



--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/502b65ad.1000...@rogers.com



Re: Recopying /home/myusername and getting it to work by copy and paste

2012-08-15 Thread tv.deb...@googlemail.com

On 15/08/2012 10:05, Merciadri Luca wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

I've got a backup of /home on some external HDD. Let us
consider that one of my internal HDDs, more precisely the one containing
/home, fails. I then need to replace it. If I manage to make the
external HDD internal, and change /etc/fstab consequently, would it work
without any issues? When should I change /etc/fstab? Would the path to
the `new internal HDD' (the one which was precedently external) be the
same as the path to the old one (the one that failed)?

Thanks.
- --
Merciadri Luca


Hi, if your backup consists in a copy of folders/files from your 
/home/username and respects the standard hierarchy (backup should 
contains a username folder with all your files and folder in it), and 
if the copy method and the filesystem preserved the permissions (and 
eventually other attributes), you can simply plug the disk in, change 
the backup drive partition UUID to the one used in the fstab and be done 
with it.


Boot your system in single user or from a live-cd, or any other linux 
system at hand, plug your external backup drive, read the UUID used for 
/home in your fstab and apply it to the external drive partition 
(unmounted):


tune2fs -U UUID-from-the-fstab /dev/address-of-backup-drive-partition

It works with labels too, use option -L instead of -U.

man tune2fs is your friend.

Of course you can do it the other way round, change your fstab to the 
new drive partition UUID or label. If the filesystem is different from 
the original partition you need to update the fstab accordingly in any case.


If you don't use UUID's or labels in fstab, then anything can happen. 
It's hard to predict the name your new drive will show up with.


Hope it helps.


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/502b97b5.4050...@googlemail.com



Re: Recopying /home/myusername and getting it to work by copy and paste

2012-08-15 Thread Merciadri Luca
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

tv.deb...@googlemail.com tv.deb...@googlemail.com writes:

 On 15/08/2012 10:05, Merciadri Luca wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Hi,

 I've got a backup of /home on some external HDD. Let us
 consider that one of my internal HDDs, more precisely the one containing
 /home, fails. I then need to replace it. If I manage to make the
 external HDD internal, and change /etc/fstab consequently, would it work
 without any issues? When should I change /etc/fstab? Would the path to
 the `new internal HDD' (the one which was precedently external) be the
 same as the path to the old one (the one that failed)?

 Thanks.
 - --
 Merciadri Luca

 Hi, if your backup consists in a copy of folders/files from your
 /home/username and respects the standard hierarchy (backup should
 contains a username folder with all your files and folder in it),
 and if the copy method and the filesystem preserved the permissions
 (and eventually other attributes), you can simply plug the disk in,
 change the backup drive partition UUID to the one used in the fstab
 and be done with it.

 Boot your system in single user or from a live-cd, or any other linux
 system at hand, plug your external backup drive, read the UUID used
 for /home in your fstab and apply it to the external drive partition
 (unmounted):

 tune2fs -U UUID-from-the-fstab /dev/address-of-backup-drive-partition

 It works with labels too, use option -L instead of -U.

 man tune2fs is your friend.

 Of course you can do it the other way round, change your fstab to the
 new drive partition UUID or label. If the filesystem is different from
 the original partition you need to update the fstab accordingly in any
 case.

 If you don't use UUID's or labels in fstab, then anything can
 happen. It's hard to predict the name your new drive will show up
 with.

 Hope it helps.
Thanks for both messages.

- -- 
Merciadri Luca
See http://www.student.montefiore.ulg.ac.be/~merciadri/
- -- 

Failure is not falling down, you fail when you don't get back up.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 http://mailcrypt.sourceforge.net/

iEYEARECAAYFAlAroH4ACgkQM0LLzLt8MhzajgCcDjrEaFcZCvrkyAl9YIZEEEPK
v2cAoJJw82alF/+gYfB6554A7wvKTayt
=NDwT
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/87mx1w1eo1.fsf@merciadriluca-station.MERCIADRILUCA



Re: Recopying /home/myusername and getting it to work by copy and paste

2012-08-15 Thread Camaleón
On Wed, 15 Aug 2012 10:05:24 +0200, Merciadri Luca wrote:

 I've got a backup of /home on some external HDD. Let us consider that
 one of my internal HDDs, more precisely the one containing /home, fails.
 I then need to replace it. If I manage to make the external HDD
 internal, and change /etc/fstab consequently, would it work without any
 issues? 

Yes, provided the copy/paste operation is properly done and file 
permissions are restored as is. For these tasks I would avoid GUI tools 
(such Nautilus or another graphical file browser) and proceed with 
command line or using Midnight Commander.

 When should I change /etc/fstab? 

When you want. 

If the system is still usable and you can login and /home is under a 
separate partition and mounted at boot, you can copy the backed up into 
the new disk, ensure the perms are okay, edit the /etc/fstab 
accordingly and reboot.

If the system is unbootable by now, you can then apply the changes from a 
LiveCD.

 Would the path to the `new internal HDD' (the one which was precedently
 external) be the same as the path to the old one (the one that failed)?

That's irrelevant as you should be using UUID/ID/LABEL/PATH to name the 
new device in fstab ;-)

Tip: never delete things that you can simply comment out (#) them, that 
way you always retain the old entries for future references.

Greetings,

-- 
Camaleón


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/k0gdle$anh$7...@dough.gmane.org