Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: sda1 is 95% full / Backup failed: correct approach to removing unnecessary files?

  1. #1
    Join Date
    Jan 2009
    Location
    Northern Arkansas USA
    Beans
    462
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    sda1 is 95% full / Backup failed: correct approach to removing unnecessary files?

    Hello,

    When I used the BACKUP utility to save my /HOME user area onto a separate hard drive subfolder the backup failed when it informed me
    sda1 was less than 1 GB. I am perplexed why the sda1 [filesystem root] partition is filling up when the folder it was intstructed to use is on another physical drive.

    I checked the /var subdirectory and there are no huge files there.

    Why does the BACKUP utility even access filesystem root when doing its /HOME backup operation?

    I have attached a screenshot of "DISKS" showing sda1 is 95% full.

    What is the correct approach to freeing up space?

    thank you....
    Attached Images Attached Images

  2. #2
    Join Date
    Jul 2008
    Location
    The Left Coast of the USA
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: sda1 is 95% full / Backup failed: correct approach to removing unnecessary files?

    Have you tried looking at /var/log and cleaning up old logs?

    Maybe do

    Code:
    sudo journalctl --vacuum-time=3d
    You can lower 3 to 1 (or even a fraction) for days to get rid of more.
    Last edited by QIII; June 13th, 2023 at 03:44 AM.
    Please read The Forum Rules and The Forum Posting Guidelines

    A thing discovered and kept to oneself must be discovered time and again by others. A thing discovered and shared with others need be discovered only the once.
    This universe is crazy. I'm going back to my own.

  3. #3
    Join Date
    May 2010
    Beans
    3,402

    Re: sda1 is 95% full / Backup failed: correct approach to removing unnecessary files?

    What is the output of
    Code:
    df -h

  4. #4
    Join Date
    Jun 2014
    Beans
    7,632

    Re: sda1 is 95% full / Backup failed: correct approach to removing unnecessary files?

    I can't read the text clearly in your image but it appears your first partition is the / filesystem and partition 3 is a separate /home partition. Is that correct? What was the output of the df -h command on the / and /home partitions before running Disks? Compare that to the current output of df -h. If the / file system was not 95% full before the backup, it would appear it was copied to the wrong device/partition. If the / partition was that full before using Disks, your best bet is as suggested, to check /var/logs and/or use the find command to find the largest files which you may delete.

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

    Re: sda1 is 95% full / Backup failed: correct approach to removing unnecessary files?

    If you want to backup your HOME and only your HOME, then use a command like this:
    Code:
    sudo  /usr/bin/rdiff-backup  \
            --exclude-sockets --exclude-device-files --exclude-fifos \
            --include /home \
            --exclude '**'   /       /Backups/
    Ref: Https://ubuntuforums.org/showthread....9#post14125329

    You can run that same command over and over to get different versions. Only changed data will be transferred. It is very efficient both in time and space used.
    To prevent it from filling up the backup storage, you'll want to trim the oldest backup sets off. I typically keep 90-180 days of backup sets, so to remove any that are older than that, use
    Code:
    sudo  /usr/bin/rdiff-backup  --remove-older-than "90D"  --force /Backups
    The most recent backup appears as a mirror, so restoring files is just a copy from the backup area. If you need older versions of a file, directory, everything, then rdiff-backup has a --restore-as-of option that takes times, dates, versions ... it is very flexible.

    The only caveat is that the target storage, /Backups, in my example, needs to be a Unix file system. Not NTFS. Not exFAT. Not FAT32. Ext4 or f2fs are good choices.

    That's really all you need. Put those 2 commands into a {file}, chmod +x {file} - now it is a "script". Mount the backup storage to /Backups and run the script. Run it daily or weekly, then sleep better knowing you have backups for everything in any HOME directories on the system. This will get all the data for all the userids on the system, not just 1. Remember, Linux is always a multi-user OS.

    This really isn't enough for a "system" backup, but for many people, it is more than sufficient. For system backups, I have a little longer script and more directories in the "--include" list.

    Of course, you'll need to ensure the space for the source files/directories will fit into the target storage.
    Code:
    sudo du -sh /home  # Check the source
    sudo du -sh /Backups  # Check the target
    For 90 days of versioned backups, you'll want the target area to be 30% larger than the source files. Of course, YMMV.

  6. #6
    Join Date
    Jan 2009
    Location
    Northern Arkansas USA
    Beans
    462
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: sda1 is 95% full / Backup failed: correct approach to removing unnecessary files?

    QIII,

    Holy crap! That journalctl command freed up about 2.2G and gave me some breathing room!!! Thanks.
    I now need to continue looking for other superfluous files to remove. I wish there was a batch/script file
    a user could run that would go in and do a super, but safe, vacuum of filesystem root.

  7. #7
    Join Date
    Jan 2009
    Location
    Northern Arkansas USA
    Beans
    462
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: sda1 is 95% full / Backup failed: correct approach to removing unnecessary files?

    df -h output:

    ed@ed-G41MT-S2PT:~$ df -h
    Filesystem Size Used Avail Use% Mounted on
    udev 3.9G 0 3.9G 0% /dev
    tmpfs 792M 1.7M 790M 1% /run
    /dev/sda1 23G 20G 2.4G 90% /
    tmpfs 3.9G 57M 3.9G 2% /dev/shm
    tmpfs 5.0M 4.0K 5.0M 1% /run/lock
    tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
    /dev/loop0 128K 128K 0 100% /snap/bare/5
    /dev/loop1 56M 56M 0 100% /snap/core18/2751
    /dev/loop2 56M 56M 0 100% /snap/core18/2745
    /dev/loop4 64M 64M 0 100% /snap/core20/1891
    /dev/loop3 64M 64M 0 100% /snap/core20/1879
    /dev/loop5 74M 74M 0 100% /snap/core22/634
    /dev/loop6 219M 219M 0 100% /snap/gnome-3-34-1804/90
    /dev/loop7 219M 219M 0 100% /snap/gnome-3-34-1804/93
    /dev/loop8 350M 350M 0 100% /snap/gnome-3-38-2004/137
    /dev/loop9 350M 350M 0 100% /snap/gnome-3-38-2004/140
    /dev/loop10 461M 461M 0 100% /snap/gnome-42-2204/102
    /dev/loop11 66M 66M 0 100% /snap/gtk-common-themes/1515
    /dev/loop12 92M 92M 0 100% /snap/gtk-common-themes/1535
    /dev/loop14 13M 13M 0 100% /snap/snap-store/959
    /dev/loop13 46M 46M 0 100% /snap/snap-store/638
    /dev/loop15 54M 54M 0 100% /snap/snapd/19122
    /dev/loop16 54M 54M 0 100% /snap/snapd/19361
    /dev/sda3 78G 21G 53G 29% /home
    tmpfs 792M 96K 792M 1% /run/user/1000
    /dev/loop17 74M 74M 0 100% /snap/core22/750
    /dev/loop18 461M 461M 0 100% /snap/gnome-42-2204/105
    /dev/sdb1 71G 41G 27G 61% /media/ed/04e8bdce-0446-4973-96c5-7cd2afd52d5d1
    ed@ed-G41MT-S2PT:~$
    Last edited by ozark_hillbilly; June 13th, 2023 at 07:49 PM. Reason: removed comment about /tmpfs

  8. #8
    Join Date
    Jan 2009
    Location
    Northern Arkansas USA
    Beans
    462
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: sda1 is 95% full / Backup failed: correct approach to removing unnecessary files?

    "....your first partition is the / filesystem and partition 3 is a separate /home partition. Is that correct? "

    Yes, that is correct. I am fairly confident I used the right pointer reference to locate the backup on the other hard drive.
    I will definitely use your "find" suggestion to keep looking for extraneous files.

    Which areas of filesystem root should not be tampered with and which areas are ok to remove? I would think /logs files under
    /var is a fair target. I definitely do not want to get overzealous and remove anything that will screw the OS/kernal up.

    Thanks for your input.

    edit - The GNU findutils is an amzing tool! Looking at the documentation now.
    Last edited by ozark_hillbilly; June 13th, 2023 at 08:19 PM.

  9. #9
    Join Date
    Jan 2009
    Location
    Northern Arkansas USA
    Beans
    462
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: sda1 is 95% full / Backup failed: correct approach to removing unnecessary files?

    TheFu,

    Man, that was a killer post you gave me!! I need to digest all that info and try to setup my backups in the manner
    you suggested. I will visit the link provided and give it a go.
    I think I am in good shape because almost all my drive partitions are configured as Ext4.

    Thanks alot!!!!!

    edit -

    "Mount the backup storage to /Backups and run the script."

    I created /Backups directory. Is this the correct syntax for linking my other drive partition [sdb1] to /Backups?

    sudo mount -t Ext4 umask=0222 /dev/sdb1 /Backups

    thanks...
    Last edited by ozark_hillbilly; June 14th, 2023 at 05:11 AM. Reason: additional question to user

  10. #10
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    13,824
    Distro
    Ubuntu

    Re: sda1 is 95% full / Backup failed: correct approach to removing unnecessary files?

    You could probably clear up some more space by removing snaps completely.
    Since you don't have any worthwhile to have snapd installed.
    The only snap you have listed is snap-store.
    The rest are all underlying support snaps.
    You could simply uninstall all of them and remove any snapd apt packages (if installed) and it should clear up some space at least.

    snap store can be replaced with gnome-software (and/or synaptic if you never want to install snaps or flatpak packages.)
    (synaptic only deals with apt packages, gnome-software has extra plugins that allow installing apt, snap and flatpak packages)
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

Page 1 of 3 123 LastLast

Tags for this Thread

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
  •