A GUI method to relocate personal data from /home in Mint Cinnamon

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Post Reply
User avatar
Lady Fitzgerald
Level 15
Level 15
Posts: 5821
Joined: Tue Jan 07, 2020 3:12 pm
Location: AZ, SSA (Squabbling States of America)

A GUI method to relocate personal data from /home in Mint Cinnamon

Post by Lady Fitzgerald »

One problem with the default location of personal data—Documents, Downloads, Music, Pictures, Videos, etc.—in /home is it complicates making and maintaining backups. Some people relocate /home to its own partition to avoid that but, since OS and program settings are also located in /home, that can add its own set of complications when backing up the OS and programs.

Instead of relocating /home, I prefer to relocate the default personal data folders only to another drive or, in the case of a computer with only one drive, another partition and leave /home in its default location. The method described below is easiest when using a mouse.

First, if you already have personal data in /home, you need to back it up to a USB connected external backup drive (an online backup could be used but that could take longer and things can go wrong). You could simply copy and paste it from the computer to the backup drive or use a program designed to backup the data to the external drive (I favor FreeFileSync but there are others that can be used).

Once your data has been backed up, if you have only one drive in your computer (common in smaller, less expensive laptops), you will either need to add a data drive to the computer (not always an option) or shrink the main partition down to a smaller size (after deleting the data folders; again, make sure they are backed up first!) so you can create a data partition in the unallocated space that will remain after shrinking the main partition (I prefer using Gparted to shrink the main partition and to create the new data partition; I'll write a tutorial for that someday). You can name the new drive or partition whatever you want.

The new data partition will need to set to automatically mount when booting (starting up) the computer (there are tutorials here on how to get a partition to automatically mount at boot**).

If you have a second drive already installed, formatted, and set to automatically mount when booting up, you are already ready to go (there are tutorials here on how to automatically mount drives at boot**; I'll be writing a tutorial on how to format a new drive or partition someday).

Open up the new data drive or partition on the right side of your monitor, then open up /home on the left side of your monitor. If you still have your personal data folders in /home, you can simply drag them to the new data drive or partition.* This may take a while to finish if there is very much data in the folders. If you had to delete the data folders in /home, create new ones in the new data drive or partition, then restore the data into them from your backup.

If the file or folder you are dragging from is on a different drive or partition than the one you are dragging to, you will copy the file or folder rather than just moving it. If that happens, just verify the folder or file in the new location is the same as the original one, then delete the original one.

Mint has the annoying habit of recreating the deleted or relocated folders the next time you boot it up, which can cause confusion when saving data. To prevent that, it will be necessary to replace the deleted or moved folders with shortcuts (a.k.a. symlinks) in /home. A shortcut is an empty file or folder that, when you click on it, the actual file or folder the shortcut points to will open up. If you save to a shortcut, the data will be saved in the actual file or folder.

Edit: For some reason, when you delete the Desktop folder in /home, it gets replaced, even if you try to replace it with a shortcut. The way I've found to deal with this is to make shortcuts to each file, folder, or shortcut inside the desktop folder in the new data drive/partition, and place them inside the desktop folder in /home.

The quick and dirty...er...quick and easy way to create a shortcut is, with the new data drive or partition open on the right side of the monitor and /home open on the left side of the monitor, left click the mouse on a data folder on the new data drive or partition to highlight it, press and hold down both the CTRL and SHIFT keys, then, while holding the keys down, left click the mouse on the highlighted folder and, while holding down the left click mouse button, drag it to /home, then release the mouse button, then the keys.

Instead of dragging the folder and its contents, you will have created a shortcut. The icon will have a small arrow in the lower right hand corner of the icon.

Rinse and repeat for the remaining data folders, then you will be done.

If you want the folders to show up on your desktop, you can create additional shortcuts the same way, only drag to the desktop instead of /home. A file or folder can have more than one shortcut pointing to it.

Again, before performing any of the steps in this tutorial, make sure your data is backed up! You should have no problems but “stuff” can happen so it’s better to have the backup just in case something goes pear shaped.


* To drag a file or folder somewhere with a mouse, left click on the file or folder to be dragged and, while holding down the left mouse button, move the mouse to drag the file or folder to where you want it, then release the mouse button to drop it there.

** This is one of several tutorials on how to automatically mount a partition or drive at startup (boot). viewtopic.php?t=397370
Last edited by Lady Fitzgerald on Thu Mar 07, 2024 5:10 pm, edited 1 time in total.
Jeannie

To ensure the safety of your data, you have to be proactive, not reactive, so, back it up!
Coffeeee
Level 2
Level 2
Posts: 98
Joined: Sun Mar 13, 2022 8:30 am
Location: virgo supercluster, milky way galaxy, solar system, earth

Re: A GUI method to relocate personal data from /home in Mint Cinnamon

Post by Coffeeee »

nice. I'm the same... almost

I'm even lazier and just want my other drive to show up in all the dialogues along with Downloads, Video, Documents.

I could not be bothered to change the Downloads, Video, Documents folders. So I just add it(drive) to the list of those folders under My Computer in Nemo.

In Nemo on the left panel
Right Click on the drive you want to add and select Add Bookmark.

Click and drag created bookmark to somewhere on the list under My Computer. Done.


All used desktop backgrounds and other stuff like that must be on boot drive IF you do not auto mount this drive.

To auto mount the drive open Disks.
Select the drive.
Click on the cog (advanced partition options)
Select Edit Mount Options
Toggle to off "User Session Defaults"
Select OK
ALL HAPPY
Post Reply

Return to “Tutorials”