Results 1 to 7 of 7

Thread: Home directory

  1. #1
    Join Date
    Jan 2020
    Beans
    Hidden!

    Home directory

    -
    Last edited by ayudha; April 6th, 2021 at 06:16 AM.

  2. #2
    Join Date
    Dec 2006
    Location
    France
    Beans
    1,098
    Distro
    Xubuntu

    Re: Home directory

    Personally, I keep the /home in the same partition as /.
    However, my data are on a separate partition and they are linked with symlinks that I put in my user profile.

    The point being that when I upgrade, I install from scratch, with a brand new /home so that no former configuration file can interfere with the new flavor.
    Ubuntu user # 14396

  3. #3
    Join Date
    Jan 2020
    Beans
    Hidden!

    Re: Home directory

    -
    Last edited by ayudha; April 6th, 2021 at 06:17 AM.

  4. #4
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Home directory

    That is what backups are for. So when hard drive fails, it becomes easy to restore your system from your backup.

    You can move all of /home to new partition and reuse it, but that still needs backup.
    To move /home uses rsync- Be sure to use parameters to preserve ownership & permissions
    https://help.ubuntu.com/community/Pa...ng/Home/Moving

    And you can move just the data folders to new partition(s) and link the folders back into /home. Then /home is tiny - 358M and real easy to backup, just the hidden user settings. I also move some larger hidden folders like Firefox & Thunderbird profile.

    Code:
    fred@z170-focal-k:~$ sudo du -hx --max-depth=1 / 2> /dev/null 
    [sudo] password for fred:  
    108K    /mnt 
    8.0K    /media 
    561M    /var 
    4.0K    /opt 
    4.0K    /srv 
    1.1M    /root 
    6.1G    /usr 
    16K     /lost+found 
    358M    /home 
    9.1M    /etc 
    197M    /boot 
    4.0K    /cdrom 
    8.6G    /
    
    http://ubuntuforums.org/showthread.php?t=2315714
    Splitting home directory discussion and details:
    http://ubuntuforums.org/showthread.php?t=1811198 &
    http://ubuntuforums.org/showthread.php?t=1901437
    http://ubuntuforums.org/showthread.p...hlight=%2Fdata
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  5. #5
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Home directory

    Quote Originally Posted by ayudha View Post
    I am on PopOS and i was wondering if it is a good idea to move the entire Home directory to my other partition and if this is ok how do i do that?
    Sometimes yes.
    Sometimes it isn't worth the hassle.
    Answer: It depends.

    On typical desktop systems with users, I generally place HOME onto different partitions to prevent a bad user process from filling up the OS partition and crashing the computer.
    On most servers, where no end-users are allowed, I don't bother. Typically, the first userid created may have 50MB of files in their HOME and nothing else, so it isn't worth the trouble.

    oldfred linked to the ubuntu wiki for how to move /home to other storage. This gets into some details, but don't lose the overall goal for all those details. As long as the location in the logical directory structure, owners, groups, and permissions appear the same after you are done, then what storage is used underneath doesn't matter.
    You can change file systems in this process, if you like, though HOME directories cannot be placed onto non-Linux-native file systems. I.e. don't try to use NTFS or FAT32 or exFAT, but ext3/4, xfs, zfs, f2fs, and a bunch of others are 100% fine. Typically, I use ext4 unless there is a good reason for some other file system.
    On a raspberry pi, running from a microSD card, f2fs might be a better choice to keep the write counts down on the flash storage.
    Really new versions of Android support f2fs for the external microSD card too. That's handy.

    So ... it depends.

  6. #6
    Join Date
    Jan 2020
    Beans
    Hidden!

    Re: Home directory

    -
    Last edited by ayudha; April 6th, 2021 at 06:17 AM.

  7. #7
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Home directory

    Quote Originally Posted by ayudha View Post
    Perhaps it is easier to just copy and paste the files needed when doing a backup. cause i don't like extra software and i could not make a script for this proces in the past.
    Now to figure out where the settings are saved.
    Copy/paste would work for files in your HOME, but only if the target storage supported POSIX - so not NTFS or FAT-whatever. Don't use those for backups - ever. Some permissions could be lost in the copy process and that could break some software that really cares about security, even if you do not.

    Copy/paste outside the HOME, loses the permissions, owner, group, ACLs, xattrs and could expand drastically any sparse files. Normally, ACLS, xattrs and sparse files aren't used too much, but if they are, that's a bunch of important data that will be gone.

    One of my systems has a sparse file that is about 5MB in size on disk, but claims to be 50GB. Copying it (or using a backup tool that doesn't support sparse files) expands that file to 50GB. Sparse files are commonly used for virtual machine storage, but also for other needs. They are kewl and troubling.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •