LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Moving software and files to a new computer (https://www.linuxquestions.org/questions/linux-newbie-8/moving-software-and-files-to-a-new-computer-875693/)

aromaman 04-18-2011 02:59 PM

Moving software and files to a new computer
 
I'm running Ubuntu 10.10 on a partitioned dell laptop which I plan to replace soon. Then I hope to install Ubuntu in a partition, same as at present. What is the best way to transfer my software and files to the new machine? I can follow simple command line instructions but am a GUI slave at heart.

clkennedy 04-18-2011 03:20 PM

Are you trying to save your entire installation,your desktop or important documents and files?

markush 04-18-2011 04:13 PM

I would not recommend to copy the whole installation onto another computer. Be aware that both computers don't have the same hardware.

I'm using several computers, Slackware always installed, but some are dualbooting Slackware and Gentoo. I use the same configuration on every computer, it is relatively easy to copy your home-directory with the config-files onto another computer. You may use the tar command
Code:

tar cf myhomedirectory.tar /home/myself
where "myself" is your username, the P option is important because tar should not follow symbolic links. You can use the command within the /tmp directory as the normal user.

On the new computer perform a new installation of Ubuntu, you may create your partitions manually (with fdisk or cfdisk). In the moment when the homedirectory is extracted on the new computer, you will have the configurations like on the old one. Since your old and new Ubuntu are the same versions, there will be no differences in the programs.

Markus

EDIT: removed the P option in tar command since it is useless.

MTK358 04-18-2011 04:53 PM

Quote:

Originally Posted by markush (Post 4328432)
Code:

tar cfP myhomedirectory.tar /home/myself

What's the "P" option?

Anyway, that will save a lot of things that shouldn't be saved (including temporary files, config files (which might be incompatible wit hthe new distro), files that you would rather download again instead of backing up, etc.).

I think that this might be better:

Code:

cd ~
tar cvf mystuff.tar Documents Pictures etc...
xz mystuff.tar

Of course, you should replace "Documents Pictures etc..." with every file and folder in your home directory that you want to keep.

But the problem with this approach is that if you forget a file/folder, or didn't include one that you thought wasn't needed, you will lose it forever.

markush 04-18-2011 04:58 PM

Quote:

Originally Posted by MTK358 (Post 4328485)
What's the "P" option?...

sorry, I made a mistake, P is nonsense.

@MTK358: thanks for pointing that out.

Markus

markush 04-18-2011 05:04 PM

Quote:

Originally Posted by MTK358 (Post 4328485)
... (which might be incompatible wit hthe new distro), files that you would rather download again instead of backing up, etc.)...

I understood that the OP wants to install the same distribution (Ubuntu 10.10) on the new computer. Then there should be no problems. In the case that one wants to install another distribution or other version (more recent), I would also not recommend to save the config-files.

Markus

frankbell 04-18-2011 09:47 PM

I agree with Markus. Mostly.

I would save config files/directories that I've spent time configuring.

For example, I use the Fluxbox window manager; my mail client is the Opera browser; and my newsgroup client is Pan.

In making such a move, I would save my ~/.opera directory (mailstore), ~/.pan2 directory (newsgroup store), and ~/.fluxbox directory (Fluxbox configuration, especially the menu). I would also back up and transfer any templates that I have created in my office suite (Open Office/LibreOffice). (If I did not use Opera for mail, I would just export my bookmarks and rss feeds and then import them on the new box.)

I would also make copies of configuration files in /etc, if any, that I have edited, such as an smb.conf file or an rc.firewall file. I've used the same rc.firewall script on four different computers without having to sweat my way through rewriting it.

I might have to tailor my Fluxbox settings for a new install, especially to a different distro, but, with Fluxbox, the worst that will happen if the menu points to a missing program is that the program won't load. The rest of the menu will work.

the Opera and Pan settings and mail/newsgroup stores should transfer transparently.

I would not save any configuration files or directories that I have not altered directly.

MTK358 04-19-2011 09:11 AM

@frankbell

I agree, that's what I would do.

It's just that I'm afraid that the OP, as a newbie, might overlook such files and not back them up.

aromaman 04-19-2011 03:29 PM

Thanks for all these responses. I should have made clear that I want to keep the same version of Ubuntu and all the software (and settings) that I have added to my linux setup.

As has been said, I have little idea of where these settings are located in linux so it would be likely that I would miss some of them unless they are embedded somewher in the home directory. Also if I save all the relevant files in my home directory will I still have to reload all the software again on the new computer or is there some 'magic' shortcut? Eg I'm talking about different browsers, about Calibre, Kompozer, Virtualbox, LibreOffice etc etc.

markush 04-19-2011 03:45 PM

Quote:

Originally Posted by aromaman (Post 4329731)
...As has been said, I have little idea of where these settings are located in linux so it would be likely that I would miss some of them unless they are embedded somewher in the home directory. Also if I save all the relevant files in my home directory will I still have to reload all the software again on the new computer or is there some 'magic' shortcut? Eg I'm talking about different browsers, about Calibre, Kompozer, Virtualbox, LibreOffice etc etc.

I would recommend to make a list with all software you added manually after the installation. Then you can install this programs from the repository after you've installed Ubuntu on the new computer.

If your old and new computer have the same hardware, you can also make an image of the harddisk (clone the disk). With Linux this will also work if the hardware is not 100% the same. But then you would have to adapt the old Ubuntu-installation to the new hardware, this is (in my opinion) the harder approach for a newbie.

Markus

MTK358 04-19-2011 04:44 PM

Quote:

Originally Posted by aromaman (Post 4329731)
As has been said, I have little idea of where these settings are located in linux so it would be likely that I would miss some of them unless they are embedded somewher in the home directory. Also if I save all the relevant files in my home directory will I still have to reload all the software again on the new computer or is there some 'magic' shortcut? Eg I'm talking about different browsers, about Calibre, Kompozer, Virtualbox, LibreOffice etc etc.

Transferring installed software isn't really practical in Linux. It's not in your home directory and it's spread out in pieces in different places of your disk.

It's a much better idea to make a list of the software you want and install it using the package manager once you install the new OS.

aromaman 04-20-2011 12:15 PM

Thanks again for these responses. I'll get busy and mark the thread as solved. If I hit further issues I'll post later, once I've chosen the new machine.


All times are GMT -5. The time now is 03:45 PM.