0

I have to install a new system rather often, and therefore I have to backup my files on a separate partition or an external drive. I am familiar with different ways of ensuring a safe backup but I would like to know, notwithstanding the backup necessity, whether there is some installation setting that would keep my HOME default/visible folders intact (Desktop, Documents, Downloads, Music etc, not the hidden ones, configs etc).

I would like to use backup in case I want to restore my system (with Timeshift for example), but I would like to avoid making a backup and a restoration of my numerous multimedia files and documents when I install a new system.

I usually install on a single partition with the / flag, and I know there are others (/root, /home), but I don't think they provide what I ask.

I know how to create partitions in various ways, only flags are obscure to me.


Edit after answer:

I fear what I ask is impossible. I realize that what I'm asking is a way of separating (maybe on separate partitions?) files and directories that are all under the same user and thus within the same folder ~/.

1

A setup where you can reinstall and at the same time keep your user data (and only that, i.e., no config data) on the computer would involve putting the folders inside of your home folders on a separate partition. To maintain the same easy access to these folders, put symlinks in the home folder that refer to these folders that now reside on the other partition. Instead of using symlinks, you could mount bind folders in your home folder to the respective folders on another volume.

There are also other options that allow preserving the user data, although these also preserve user configuration data in hidden folders. Having a separate partition for /home allows for a clean install of the system, while leaving data and user configuration data alone, because you can have the system partition reformatted during the reinstall, but leave the separate /home partition alone. Just delete all hidden folders to remove the majority of user configuration.

Even if you have only a single partition, is actually also possible to install while preserving your user data. It involves manual partitioning, which you get by selecting "Something Else" in the installer. You assign the existing partition of your old install as the root (/) partition. The trick is then to uncheck the "Format" checkbox for the partition. At that point, the existing partition will not be reformatted, and the new system files will overwrite the existing files. Again just delete all hidden folders to remove the majority of user configuration. This way of installation may leave unused files from the old system lingering around, and is therefore less ideal than a reinstall where the partition is reformatted. I consider this a very good way to restore your system by reinstalling the same version this way in case some mistake as administrator badly damaged the system.

|improve this answer|||||
  • Partitioning is not a problem, the flags are obscure to me though. Can we have only one installation partition with the /home flag? Even if you have only a single partition... ...involves manual partitioning, which you get by selecting "Something Else" in the installer. You first have to assign the root partition manually. But if you set a root partition manually, isn't that a second partition? - What I would like is not possible then. because I don't want the config files of the previous system, only my documents and multimedia. – cipricus Feb 17 at 18:28
  • leaving data configuration alone is not what I want in fact – cipricus Feb 17 at 18:39
  • 1
    You still can put your user folders on a separate partition and leave the /home itself on the primary partition – vanadium Feb 17 at 19:06
  • 1
    He could always run rm -rf /home/cipricius/.*, logout or reboot. This will remove all personal "settings". Every thing would be just like new at next login documents and other files would still be there (unless that have documents that have a "." as the first character. I would still create a new partition for /home, the last time I reinstalled, /home was recognized and the installer did everything correctly to mount it, it was automatic. – Jarad Downing Feb 17 at 19:36
  • you mean that if on top of my present single partition (flagged /) I install - either with the same flag or with /home - my folders will not be affected as long as I do not check "format"? – cipricus Feb 18 at 15:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.