FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 08-15-2012, 09:02 AM
Gary Dale
 
Default Recopying /home/myusername and getting it to work by copy and paste

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-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 502B65AD.1000207@rogers.com">http://lists.debian.org/502B65AD.1000207@rogers.com
 
Old 08-15-2012, 12:36 PM
"tv.debian@googlemail.com"
 
Default Recopying /home/myusername and getting it to work by copy and paste

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-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 502B97B5.4050900@googlemail.com">http://lists.debian.org/502B97B5.4050900@googlemail.com
 
Old 08-15-2012, 03:02 PM
Camaleón
 
Default Recopying /home/myusername and getting it to work by copy and paste

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-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/k0gdle$anh$7@dough.gmane.org
 

Thread Tools




All times are GMT. The time now is 01:33 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org