I have tried searching for this one and looking for a howto, but they don’t quite match.
I have a new box with 1 gb of memory.
On my old 512 mb ram, machine (running suse 11.4 lxde) my /home directory is in it’s own partition. I presume what I have to do is copy my /home directory to my external hard drive.
Unplug old machine, hook up new machine, install Suse 12.1 (I presume this is a stable version?) with my partitions, then copy the /home directory from the external hard drive to it’s new partition.
I am just checking as I don’t want to create read-only files, which I vaguely remember doing in the past.
Hopefully, there is a howto, or instructions for this, if you could point me in the right direction.
I hope this is a completely superfluous remark, but when you copy the /home directory tree to another disk (you call it external), the file sytem the should of course be native Linux and not some MS type.
Or make a clone of it, but then be carefull that the sizes of old, intermediate and new partition match.
I have an external hard drive that I copy my home directory onto. Fortunately, I haven’t had a internal hard disk failure, so I have not had to use the complete home directory. I have only used it to find old photographs.
How? And what type of file system is on that backup disk?
I do not think that it is of any significance what is on there. Let us stick to what you aksed for. Installing on a new system and then importing the old home directory of a user of the old system (is there but one user whre you want to do this for, or are there more?)
I do not think that it is of any significance what is on there. Let us stick to what you aksed for. Installing on a new system and then importing the old home directory of a user of the old system (is there but one user whre you want to do this for, or are there more?)
There is myself and Root. There is also another user, which was set up automatically when I installed last time using lxde, but it is not used. I hope this is the information you are looking for?
On 2012-08-20 01:46, nappy501 wrote:
>
> hcvv;2480869 Wrote:
>> How? And what type of file system is on that backup disk?
>
> /dev/sdg2 ext3
> /dev/sdg1 vfat
>
> I copy the /home directory to /dev/sdg2 ext3
As long as you do not use the sdg1 partition in any phase of the procedure, you are ok.
>> I do not think that it is of any significance what is on there. Let us
>> stick to what you aksed for. Installing on a new system and then
>> importing the old home directory of a user of the old system (is there
>> but one user whre you want to do this for, or are there more?)
> There is myself and Root. There is also another user, which was set up
> automatically when I installed last time using lxde, but it is not used.
> I hope this is the information you are looking for?
Ok, so there are two users even if you do not use one of them (root does not count). The thing
you have to mind is that files in Linux are not owned by a user named “suchname”, but by a user
with an UID number of such number. When you copy files from one home user to another you have
to take into account that that number is the same on both homes - if not, you arrive at the
problem you mentioned of the files being read-only.
Alternatively, if they don’t match, you have to take ownership later with “chown”.
–
Cheers / Saludos,
Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)
Not realy. A self typed list of two partitions with the type of file systems on them is not enough to show HOW you copied. Copying involves a statement of some kind like cp, rsync or what ever you used. Allways show the maximum amount of information. Never assume that others would “of course” have done it the same way or think the same way as you.
In any case, when you use that VFAT file stem as such for backing up files from an ext2 file system, the majority of information about those file is lost! You loose owner (user/group), access bits, etc.
As said earlier: do not use non-Linux file systems in the process! Non-Linux file systems are only to enable the Linux user to exchange data with non-Linx systems. As this is Linux to Linux, that does nor fit in that usage.
There is no user Root, there is a user root and it has it’s home directory on a different place (on the root file system). When you have put things in root’s home directory on the old system and you want them again on the new system (few people have that btw), you should backup them also.
And it is still not clear if you understand my interrogation about the users on your system. You are talking all the time of the data in the home directory of one particular user (your own userid I presume, in your guise as end-user). You are not talking about the whole of */home *(separate partition or not). Can you confirm this?
I use the file manager and drag the folder to the partition on the external hard drive. Or I cut and paste the folder. It is always to the ext3 partition.
In any case, when you use that VFAT file stem as such for backing up files from an ext2 file system, the majority of information about those file is lost! You loose owner (user/group), access bits, etc.
As said earlier: do not use non-Linux file systems in the process! Non-Linux file systems are only to enable the Linux user to exchange data with non-Linx systems. As this is Linux to Linux, that does nor fit in that usage.
It is always to the ext3 partition.
There is no user Root, there is a user root and it has it’s home directory on a different place (on the root file system). When you have put things in root’s home directory on the old system and you want them again on the new system (few people have that btw), you should backup them also.
I do not believe I have anything to restore from the root.
And it is still not clear if you understand my interrogation about the users on your system. You are talking all the time of the data in the home directory of one particular user (your own userid I presume, in your guise as end-user). You are not talking about the whole of */home *(separate partition or not). Can you confirm this?
You are probably right. All I understand is when I log in, I am me a user who is not root. I am seperate. Whilst I am logged in as me, I can become root to do a particular task.
I do not understand what you mean by ‘whole of /home’? Tell me what to type to give the information you require.
And about the commands you gave. It will create a file aug2012home.tar.gz in the directory* /media* (which btw you can only do as Superuser which you did not mention). But that is all. What to do then? What is more, this will be lost at next shutdown as * /media* is a temprary disk RAM in openSUSE 12.1.
Ok, I am understanding you now better. All you want to do is save some files on the end-user level. You do this by copying them using a GUI file manager to an ext3 partition on a removble disk. That is fine.
You can then do it the other way back after to your newly installed system (either on other or on the same hardware).The only thing to take care of (as Carlos allready hinted at) is that your userid on the present system must be the same as your userid on the new system. Take care: the userid, not the username!. It is the number that is ultimately deciding which user it is. The name is only for easy human understanding.
You find that userid by looking in /etc/passwd. Or by
grep nappy501 /etc/passwd
(if nappy501 is your username).
The number in the third : separated field is your userid. It wil be something like 1000.
Now when it is the same (1000 in our example) on the new system, there is no problem. But when it is different, all your restored files will be owned by 1000, which is not nappy501 on the new system.
To cure that open a terminal and do
su -
Password:
cd /home/nappy501
chown -R nappy501 *
exit
Password is of course that of root.
This will change the ownership of all files inside* /home/nappy501 *to the userid of nappy501.
An alternative is to only change the files you restored (and not all that are there andare allready owned by nappy501). Do as you wish.
I believe I have it now. Thank you for your assistance. I think I shall use the GUI to back up the files. I am never sure what I am writing and if it will work in the way I intend when I use the command line.
On 2012-08-20 15:36, nappy501 wrote:
>
> Didn’t realise we had gone over the page.
>
> I believe I have it now. Thank you for your assistance. I think I
> shall use the GUI to back up the files. I am never sure what I am
> writing and if it will work in the way I intend when I use the command
> line.
My preferred tool to copy files intact is “mc”, Midnight Commander. It is a terminal (text)
program with full menus and even mouse if used in X. And very fast.
–
Cheers / Saludos,
Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)
SOLVED - Thank you.
I connected my external hard drive via the USB port and used Midnight Commander to copy the files to my new /home partition. I worked like a dream even if it did take all night.
When I went to bed it was copying /.beagle files and when I got up in the morning it was still copying /.beagle files.
Sometime ago I did try Beagle and found that it made my machine run very slow and it didn’t seem to work. That is it didn’t appear to find anything I searched for. Anyway I can live without it. Is there any reason why I cannot now delete this folder?
I thought beagle was history. ie not used any more. It was always a pain and slowed things down like just about every index program. I suspect you had beagle in a loop ie by changing files it triggered beagle to create more files which caused more changes and more files etc.
> When I went to bed it was copying /.beagle files and when I got up in
> the morning it was still copying /.beagle files.
Wow
> Sometime ago I did try Beagle and found that it made my machine run
> very slow and it didn’t seem to work. That is it didn’t appear to find
> anything I searched for. Anyway I can live without it. Is there any
> reason why I cannot now delete this folder?
I think you can delete it quite safely. It will probably be recreated, it does not do much
sense to backup it.
In my machine the directory has 313M.
–
Cheers / Saludos,
Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)
I hope it is not recreated as I do not use it. It is 2.6Gb made of of 185,826 files and 348 sub folders.
In my machine the directory has 313M.
Mmm!
My /home directory has 13 Gb. My .thunderbird file has 5.3 Gb, Documents has 849 mb and my photos is 1.6Gb. We appear to have blindly different usage?