How best to copy 17.1's home folder into a new 17.3?

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Lynwood
Level 4
Level 4
Posts: 225
Joined: Sat May 08, 2010 12:23 pm

How best to copy 17.1's home folder into a new 17.3?

Post by Lynwood »

Hello,

I've tried copying the folder itself, but I have to click Replace or Merge on EVERY file. Bummer; there has to be a way to copy the complete home folder; what is it? I see that it's root so at best I'd have to use sudo, but I don't know how to do that. I sure will appreciate some help. Thanks.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: How best to copy 17.1's home folder into a new 17.3?

Post by Flemur »

I've tried copying the folder itself, but I have to click Replace or Merge on EVERY file
You used a file browser...?
I see that it's root so at best I'd have to use sudo,
It's owned by root? Are you copying /root or /home/<username>? (/root is root's home).

Code: Select all

but I don't know how to do that.
Just put "sudo" in front of terminal commands or run your file-browser as root - "gksudo nemo" (or thunar, etc).

Assuming it's normal user directories, login as 17.3 and in a terminal:

Code: Select all

cp -r /old-user/location/home/username /home/username
You should copy that directory because "." files are missed with "cp -r /old-user/location/home/username*" .
Or you could do

Code: Select all

cp -r /old-user/location/home/username/* /home/username/.
cp -r /old-user/location/home/username/.* /home/username/.
to get the hidden "start with ".") files.

But if "it's root" (owned by root?) you might be doing something wrong (!!!)

Code: Select all

ls -al old-user/location/home/username
will show owner.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Lynwood
Level 4
Level 4
Posts: 225
Joined: Sat May 08, 2010 12:23 pm

Re: How best to copy 17.1's home folder into a new 17.3?

Post by Lynwood »

Sorry for the delay in responding to your help, which I really appreciate. I've been caught up in another project.

Yes, I used Dolphin. Clearly, I didn't know any better.
I simply looked at /home's properties. It said I had no privileges; it was root.
What is the gk of gksudo? I assume that works in KDE, right?
"Assuming it's normal user directories ...." What are not normal directories? Are you referring to a home directory that hasn't been modified by my adding or subtracting folders/directories?

I'm not a cl guy, so, regarding this instruction, "You should copy that directory because "." files are missed with "cp -r /old-user/location/home/username*" .
Or you could do
cp -r /old-user/location/home/username/* /home/username/.
cp -r /old-user/location/home/username/.* /home/username/.
I have a couple of questions. Because my hardware is a bit more complicated than the average user's (2 used hdds, one, a std. hdd w/ 4 OSs, including 17.1 KDE, the other being the SSD that contains 17.3 that I want to move 17.1's home folder to), I'm having a bit of difficulty in determining some of the specifics for filling in you your template. I don't know what the old-user is. I think I've figured out the location/home/username/. items.

Again, thanks for your help.
peer

Re: How best to copy 17.1's home folder into a new 17.3?

Post by peer »

If you want to start a graphical application from the terminal as root you can use kdesudo (gksudo is for gnome). So 'kdesudo dolphin' will start dolphin as root.

Copying you home directory from 17.1 to 17.3 should be easy. I do have a backup of my home directory on another drive and I am able to copy the full directory (including the hidden files) with dolphin. That is possible because I am the owner of both directories.
In your case you are not the owner of both directories. So I suggest that you try to become owner of both directories. I think that you will have to remount the directory that is owned by root to a directory that is owned by you.

In Dolphin:
- when you are trying to copy files you are asked what to do if the file already exist. In that popup-screen you can select to apply the chosen action to all.
- be sure you select "View"-"Hidden files" so you can select all files
- when you right-click a file or directory in dolphin you can perform root-actions such as copy or rename.
braingateway

Re: How best to copy 17.1's home folder into a new 17.3?

Post by braingateway »

No need to copy at all. The easiest way, you need to create a user with same previous user ID. Then just link the /home/userID to your old home folder. If you have to create a different userID with whatever reason, you just chown to change the ownership of the old home folder.
Lynwood
Level 4
Level 4
Posts: 225
Joined: Sat May 08, 2010 12:23 pm

Re: How best to copy 17.1's home folder into a new 17.3?

Post by Lynwood »

Braingateway, I want 17.1's /home to replace 17.3s so that 17.3 will have all my settings and dot folders for the added software. AND I want to replace 17.1 with 18 Cinnamon. So linking isn't the answer in this case. Nevertheless, thanks for explaining the option.

Peer,
First, I do NOT want to copy files because I made the mistake of trying that first and found that the copy function asked me if I wanted to Merge or Replace EVERY one of the thousands of files. I did see your instruction to simply apply my Merge/Replace choice to all files; that, of course, would negate the burden of making that determination for every file. But, I also want to know how to determine which of 17.3's folders has updated software that I'll want to keep so as not to replace it with 17.1's default software. Knowing that, then, I will want to copy as much of 17.1's /home as I can, including its dot files, without retrograding any of 17.3's default software. I gather that I can do that graphically with kdesudo, first backing up 17.3's /home, right?

Thanks for the continuing help.
peer

Re: How best to copy 17.1's home folder into a new 17.3?

Post by peer »

I do not think that there will be huge differences in the dot files in 17. 1 or 17.3. So replacing all dotfiles is an option for me.

Copying files a root seems to be a quick solution. But the ownership of the files will not change during copying. So after copying the files will be in the right place but you will not have full access to the files because you are not the owner. I think that can lead to strange problems.

When I made the jump from 17.1 to 17.3 I did a clean install. From my daily backup I took the dotfiles for thunderbird and firefox. Then I had the most important applications (for me) running again. Of course I lost lot of other adjustments I had done before. Sometimes I made the same changes again but a few times I looked in my backup for the specific dotfile. This method works for me.
User avatar
golf4fun
Level 1
Level 1
Posts: 48
Joined: Sat Dec 10, 2011 3:39 pm

Re: How best to copy 17.1's home folder into a new 17.3?

Post by golf4fun »

I'm late getting to this topic but what I do is when I do a new install I leave the home folder unformatted just format root.
My partitions are root swap and /home. No need to copy anything
Mint KDE 64 bit.
Lynwood
Level 4
Level 4
Posts: 225
Joined: Sat May 08, 2010 12:23 pm

Re: How best to copy 17.1's home folder into a new 17.3?

Post by Lynwood »

golf4fun, you didn't read my original post. I'm not concerned just with installing and using as is a new version of Mint; I want to add to my new installation of 17.3 ALL of the dot folders from my old version, 17.1, which contains the settings for all added software. How I do that simply, that is, copy the old /home folder with all its dot files into the new /home folder, without a long, complicated process is my question.
User avatar
austin.texas
Level 20
Level 20
Posts: 12003
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: How best to copy 17.1's home folder into a new 17.3?

Post by austin.texas »

Lynwood wrote:I want to add to my new installation of 17.3 ALL of the dot folders from my old version, 17.1, which contains the settings for all added software. How I do that simply, that is, copy the old /home folder with all its dot files into the new /home folder, without a long, complicated process is my question.
Does the new user in 17.3 have the same user name as the previous user (Mint 17.1)?
We can provide specific suggestions, but we need specific information.
Running 17.3, mount the 17.1 /home partition, and post the result of

Code: Select all

inxi -po
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018
Lynwood
Level 4
Level 4
Posts: 225
Joined: Sat May 08, 2010 12:23 pm

Re: How best to copy 17.1's home folder into a new 17.3?

Post by Lynwood »

Ok. I'm not at home now. I'll do that tomorrow, 8-19. Thanks.
Lynwood
Level 4
Level 4
Posts: 225
Joined: Sat May 08, 2010 12:23 pm

Re: How best to copy 17.1's home folder into a new 17.3?

Post by Lynwood »

Sorry for the additional delay.

Yes, the computer/account name on both 17.1 & 17.3 are the same, lynn.

Your command results:
Partition: ID-1: / size: 460G used: 7.9G (2%) fs: ext4 dev: /dev/sda1
ID-2: /media/lynn/Kubuntu size: 50G used: 9.0G (20%) fs: ext4 dev: /dev/sdb7
ID-3: /media/lynn/Mint 17.1 Mate size: 50G used: 41G (86%) fs: ext4 dev: /dev/sdb6
ID-4: /media/lynn/Ubuntu-UnityMate size: 50G used: 24G (51%) fs: ext4 dev: /dev/sdb5
ID-5: /media/lynn/Mint 17.1 KDE size: 50G used: 28G (59%) fs: ext4 dev: /dev/sdb1
ID-6: /media/lynn/Ray'sInformation size: 258G used: 48G (20%) fs: ext4 dev: /dev/sdb8
ID-7: /media/lynn/2171bc1d-0ef2-4f26-99e7-047dad230b2e size: 459G used: 70M (1%) fs: ext4 dev: /dev/sdc5
ID-8: swap-1 size: 10.49GB used: 0.00GB (0%) fs: swap dev: /dev/sda5
Unmounted: ID-1: /dev/sdb3 size: 4.29G
label: N/A uuid: bbf197e7-bffc-437b-bcac-b1a219be78b3

ID-5 is the installation whose home folder, or at least its dot files, I want copied to the 17.3 KDE's home folder and isn't on this hdd and therefore isn't listed here; it's on an SSD whose GRUB does list it, along with all the installations on the hdd. I have two GRUB2s installed, one on the hdd that lists all installations on that hdd and one on the SSD which lists *all* installations, the 17.3 on it and all those on the hdd.

Hope this helps.
phd21
Level 20
Level 20
Posts: 10104
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: How best to copy 17.1's home folder into a new 17.3?

Post by phd21 »

Hi "Lynwood",

I just read your post and the good replies to it. Here are my thoughts on this as well.

After reading all of this, I am a little confused in what your objectives are. During most of your post and replies you want to copy (replicate) your current KDE "/home " folder from v17.1 to 17.3. Then, in another post it seemed like you want to copy your "/home" folder from Linux Mint KDE 17.1 to Cinnamon 18 (which I do not think is a good idea)?

You can just upgrade Linux Mint (any edition) from 17.1 to 17.3 through the Mint Update Manager. If you have already installed Linux Mint KDE onto another hard drive partition somewhere, and you are using the same user name, then you can use the "Dolphin" file manager, select "Show Hidden files", select all, then copy to that other partition's "/home" folder (or select copy and then paste). You only have to select the overwrite option 2 times, once for folders, and once for files, if you select "always" , or "remember", when that happens. I do not know all the ramifications of copying all the folders from a home folder with a different user name into another partition's home folder under a different user name are, it may have little or no effect, or it might affect some applications.

There is also a great backup utility called "Aptik" that is made for doing this. They have other good information on this.
To install "Aptik", download their easy installer ".deb" file, and double click that, or install their PPA below by Opening a console terminal prompt and type in each line one by one, or copy & paste each line, below:

Aptik website - their "homepage" has links to download the 32-bit or 64-bit easy installer Aptik ".deb" file.
http://www.teejeetech.in/2014/01/introducing-aptik.html


sudo apt-add-repository ppa:teejee2008/ppa
sudo apt-get update
sudo apt-get install aptik


You can also use a program like "FreeFileSync" to safely replicate (copy) your "/home" folder from one place to another, or to back it up.

Free File Sync - FreeFileSync is a folder comparison and synchronization tool providing highly optimized performance and usability without needless user interface complexity.
http://www.freefilesync.org/

To install FreeFileSync using the PPA method, open a console terminal, type in, or copy & paste, each line below one by one:

sudo add-apt-repository ppa:freefilesync/ffs
sudo apt-get update
sudo apt-get install freefilesync


Hope this helps ...
Last edited by phd21 on Sat Aug 20, 2016 4:35 pm, edited 1 time in total.
Phd21: Mint 20 Cinnamon & KDE Neon 64-bit Awesome OS's, Dell Inspiron I5 7000 (7573, quad core i5-8250U ) 2 in 1 touch screen
User avatar
austin.texas
Level 20
Level 20
Posts: 12003
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: How best to copy 17.1's home folder into a new 17.3?

Post by austin.texas »

The Grub menu installations do not matter, but to copy directly from one partition to another, both have to be mounted.
You can see my previous request:
austin.texas wrote:
Lynwood wrote: Running 17.3, mount the 17.1 /home partition, and post the result of

Code: Select all

inxi -po
Your results for the inxi command list 3 drives, sda, sdb, and sdc. Is the SSD one of those?
A better command might be:

Code: Select all

sudo lsblk -o model,name,size,fstype,label,uuid,mountpoint
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018
User avatar
austin.texas
Level 20
Level 20
Posts: 12003
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: How best to copy 17.1's home folder into a new 17.3?

Post by austin.texas »

By the way, you do have to be selective in copying the hidden files from KDE to Cinnamon, as phd21 mentioned. Those are different enough that you could cause problems.
You can copy program configurations, such as:
.avidemux
.gconf
.config/autostart
.config/Pinta
.config/roxterm.sourceforge.net
.config/smplayer
.config/vlc
.config/clipit
.filezilla
.grsync
.icons
.local
.multisystem
.puddletag
.themes
.wallpapers
.config/google-chrome
.mozilla/seamonkey
.asunder*
.bash_history
.gimp-2.8
.gnupg
.bashrc
.face
.SamsungPrinter
Those are the ones I copy.
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018
Lynwood
Level 4
Level 4
Posts: 225
Joined: Sat May 08, 2010 12:23 pm

Re: How best to copy 17.1's home folder into a new 17.3?

Post by Lynwood »

Austin.Texas:
"The Grub menu installations do not matter, but to copy directly from one partition to another, both have to be mounted.
You can see my previous request:"
That's exactly what I did. I had 17.3 mounted by definition by virtue of being logged into it and in it I mounted 17.1. Then I ran your command.
Also, see my comment to phd21 below about copying 17.1 KDE's home folder into a 17.3 Cinnamon's home folder.

sda is the SSD, sdb is the hdd containing the four OSs, and sdc is an empty additional hdd.


phd21:
I don't know what I said that gave you and another the idea that I wanted to copy 17.1's home folder into a Mint Cinnamon installation; I don't. I want to copy Mint KDE 17.1's home folder or at least its dot folders, which is on sdb, into the Mint KDE 17.3 installation on the SSD, on sda.
FreeFileSync looks interesting. I'll look into it. Thanks.

Alas, upgrading from 17.1 to 17.3 is too late; I installed 17.3 on the SSD rather than 17.1, not knowing that I could upgrade it. If I'd known that, I would have cloned 17.1 from the hdd to the SSD and upgraded it. Sigh. Live and learn. Actually, I still could do that, but it might be simpler to just copy the dot files. I'll think about it and consider all advice.

Does anyone know if there is any software in any of a Mint version's dot files that is specific to that version, say 17.1, that would be different from and possibly problematical in another version, say 17.3?

Thanks for the continuing help.
phd21
Level 20
Level 20
Posts: 10104
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: How best to copy 17.1's home folder into a new 17.3?

Post by phd21 »

Hi "Lynwood",

You can easily re-format the SSD drive and clone the previous partition(s), or drive, to the SSD drive, then update to a newer version using the Mint Update Manager. Keeping in mind that the new SSD drive must be larger (even if only a very little larger). FYI: there are advanced settings in "Clonezilla Live" to allow partitions to be cloned to smaller drives, as long as the partition and its actual data (excluding free space) are less than the SSD drives total capacity. If the drive cloning works, then the boot up (Grub2) should also work. If the boot up (Grub2) needs to be updated, that is easy to do as well, using a bootable utility program like "boot-repair-disc (CD)", or through console terminal commands.

This quote below from you is where I got the impression that you might have wanted to switch editions of Linux Mint, but obviously this could be a typo on your part.
Braingateway, I want 17.1's /home to replace 17.3s so that 17.3 will have all my settings and dot folders for the added software. AND I want to replace 17.1 with 18 Cinnamon. So linking isn't the answer in this case. Nevertheless, thanks for explaining the option.
"FreeFileSync" is a fantastic, and very fast, application for doing daily backups of things that change daily, like documents, data, passwords, "/home" folder application configurations (dot folders), etc... and the files are basically "copied", so you can easily access them on the backup drive versus image backups which makes accessing the compressed backed up data more difficult without restoring.

"FreeFileSync" would also work for copying your "/home" folder from the one drive to the other SSD drive's "/home" folder, if you want to try it. Since you are going from KDE v17.1 to KDE v17.3, I don't think there would be any issues doing that.

Good Luck ...

Hope this helps ...
Phd21: Mint 20 Cinnamon & KDE Neon 64-bit Awesome OS's, Dell Inspiron I5 7000 (7573, quad core i5-8250U ) 2 in 1 touch screen
Lynwood
Level 4
Level 4
Posts: 225
Joined: Sat May 08, 2010 12:23 pm

Re: How best to copy 17.1's home folder into a new 17.3?

Post by Lynwood »

All,

phd21 says that I can upgrade 17.1 to 17.3, presumably regardless of DE, with Mint's upgrade utility; I see that in my 17.1's update utility. Does the upgrade keep my added desktop images?

I'd swear that I've used Boot Repair Disk to repair my two GRUBs before to no avail, but I just ran it and it worked; now I have only one GRUB, listing all OS installations. Thanks for goosing me.

"This quote below from you is where I got the impression that you might have wanted to switch editions of Linux Mint, but obviously this could be a typo on your part." I meant to say that, after getting 17.3 with all of 17.1's dot folders/files on the SSD, I wanted to replace 17.1 on the hdd with 18 Cinnamon (I wouldn't need 17.1 anymore, & I'd like to see what 18 Cinnamon is like, i.e., have it to play with).

How does FreeFileSync compare with Mint's built-in back-up utility?
phd21
Level 20
Level 20
Posts: 10104
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: How best to copy 17.1's home folder into a new 17.3?

Post by phd21 »

Hi "Lynwood",

You can easily upgrade versions within a specific edition of Linux Mint from 17.1 to 17.3, then to version 18 if you want to. For example from KDE 17.1 to KDE 17.3, or Cinnamon 17.1 to Cinnamon 17.3. You will not loose anything doing this. But, it is always a good idea to have backups, regardless whether you are upgrading or not. I do not think you can easily and safely upgrade from KDE to Cinnamon or visa-versa. If you have the disk space, you can always install Cinnamon along side of KDE, or another operating system (dual boot). Or, install VirtualBox (VB) or VMware, and install and run any or all editions of Linux Mint in that, if you have enough computer system memory and the drive space.

IMHO, there are certain "must have" bootable utilities for all computer users regardless of which operating system you use, and the "Boot Repair Disc CD" is one of them. Here are some others: "Gparted Live", "Super Grub2" (allows you to boot into the various operating systems you have installed, even if the boot process is corrupted, also allows users whose computers are so old they cannot boot to a USB drive directly to do so (like mine :? ) and or "RescaTux" (includes Super Grub2 and more), "MiniTool Partition Wizard" (for MS Windows File Systems, including external USB drives with NTFS), & of course your Live installation edition and version DVD or USB flash drive stick of Linux Mint, etc...
Lynwood wrote:How does FreeFileSync compare with Mint's built-in back-up utility?
They are two different applications, both are good. You should try them both yourself. Mint's backup is for your "/home" folder and installed software. FreeFileSync is for whatever you want to back up or sync, including your "/home" folder. I personally prefer FreeFileSync (FFS) because I can run a "compare" to see what has changed before actually running the sync. I use FFS for daily or frequent fast backups of things that have changed daily (frequently).

Let me expand on this a little. It is a very good idea to have more than one backup of your important personal and or business data, documents, passwords, multi-media files (music, videos, pictures), etc... If you can afford it, I recommend having two external USB drives that you alternate using. This way if something happens to one external backup drive, a power outage while backing up, disk failure, whatever, then at least you have the other external drive with good copies of your important (irreplaceable) files and folders. Linux Mint and all your installed software can always be re-installed, easily with certain programs or even manually (again) with time and effort, but your personal and business data, files and folders cannot, if there is no backup of it. I also have a handful of various USB flash drive sticks that I use for backing up personal files and folders using FreeFileSync. FFS makes this easy as well, because you can save and load FFS profiles as "something.ffs". I have FFS profile files for each external hard drive (WD-Passport-Blue.ffs, WD-Passport-Grey.ffs), and each USB flash drive stick: LittleBlue16gb.ffs, Patriot8gb.ffs, Orange-microSD.ffs, etc..

And, I have a fully installed Linux Mint system on a USB flash drive stick for a portable version of Linux Mint, and in case the computer or its internal hard drive fails.

As I stated before I use the incredible "Aptik" to make a backup of all my Linux Mint stuff which can include your home folder as well. I use Aptik after I have Linux Mint setup with everything the way I want it, and then if I installed a lot of new software, and before any major updates or upgrades. This makes installing a fresh copy of Linux Mint easy to do if you need or want to. I also use the great "Clonezilla Live" for making backup images of a whole drive and or its partitions around once a month or more, and certainly before any major update or upgrade, or before installing some software that might change something system wide.

Hope this helps ...
Last edited by phd21 on Mon Aug 22, 2016 6:45 pm, edited 4 times in total.
Phd21: Mint 20 Cinnamon & KDE Neon 64-bit Awesome OS's, Dell Inspiron I5 7000 (7573, quad core i5-8250U ) 2 in 1 touch screen
User avatar
austin.texas
Level 20
Level 20
Posts: 12003
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: How best to copy 17.1's home folder into a new 17.3?

Post by austin.texas »

phd21 wrote: "RescaTux" (includes Super Grub2 and more),
Formerly true, but not true anymore. The new RescaTux does not include SuperGrub2. SuperGrub2 is now only available on it's own CD. I consider it a "must have" utility, also.
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018
Locked

Return to “Software & Applications”