Proper Timeshift Management/Reclaiming Space

I have Timeshift setup on my machine to take a snapshot weekly and keep 2 copies. I have the standard ‘ignore user files’ and set it to exclude all on both /home/user and root. When I go into Timeshift I can see my snapshot (I manually deleted what would have been my 1 and 2 week old after excluding ollama models and created a manual one to save some space) and when I click browse it brings me to /timeshift/snapshots/date. I am using rsync as I don’t use a BTRFS filesystem.

Running a du on the snapshots folder gets me:

97G     snapshots
73G     snapshots/2025-03-23_17-56-56
72G     snapshots/2025-03-23_17-56-56/localhost
32G     snapshots/2025-03-23_17-56-56/localhost/opt
30G     snapshots/2025-03-23_17-56-56/localhost/opt/rocm
29G     snapshots/2025-03-23_17-56-56/localhost/opt/rocm/lib
25G     snapshots/2025-03-23_17-50-56/localhost
25G     snapshots/2025-03-23_17-50-56
24G     snapshots/2025-03-23_17-50-56/localhost/opt
23G     snapshots/2025-03-23_17-56-56/localhost/var
23G     snapshots/2025-03-23_17-50-56/localhost/opt/rocm
22G     snapshots/2025-03-23_17-50-56/localhost/opt/rocm/lib
19G     snapshots/2025-03-23_17-56-56/localhost/var/lib
18G     snapshots/2025-03-23_17-56-56/localhost/usr
17G     snapshots/2025-03-23_17-56-56/localhost/var/lib/flatpak

Which seems larger than I would want it to be? Are there some more files/folders I should be ignoring? (I found it was backing up ollama models which I have ignored and reclaimed ~96G). rocm seems to eat a bunch of space. as well as flatpak. Should I be ignoring those? Worse case scenario I have to reinstall my flatpaks and rocm?

However, I was curious as to what on my system is eating the most space because I feel like I am always out of space so I ran

du -h * | sort -rh | head -n 20 
320G    home/user
320G    home
250G    run
237G    run/timeshift/8265/backup
237G    run/timeshift/8265
237G    run/timeshift
// other entries 

Which leads me to question, what the hell is this run/timeshift and why does it take up 1/4 of my drive (according to du)?

/run/timeshift/8265/backup  ls -la                                                                                                                                                             ✔ 
total 128
drwxr-xr-x  19 root root  4096 Feb 18 23:11 .
drwxr-xr-x   3 root root    60 Mar 23 17:31 ..
lrwxrwxrwx   1 root root     7 Dec  2 16:33 bin -> usr/bin
drwxr-xr-x   5 root root  4096 Mar 23 17:00 boot
-rw-r--r--   1 root root 22560 Dec 23  2022 desktopfs-pkgs.txt
drwxr-xr-x   2 root root  4096 Jan  5  2023 dev
drwxr-xr-x 121 root root 12288 Mar 23 17:16 etc
drwxr-xr-x   3 root root  4096 Jan  5  2023 home
lrwxrwxrwx   1 root root     7 Dec  2 16:33 lib -> usr/lib
lrwxrwxrwx   1 root root     7 Dec  2 16:33 lib64 -> usr/lib
drwx------   2 root root 16384 Jan  5  2023 lost+found
-rw-r--r--   1 root root     8 Dec 23  2022 .manjaro-tools
drwxr-xr-x   3 root root  4096 Jul 30  2023 media
drwxr-xr-x   2 root root  4096 Oct 19  2022 mnt
drwxr-xr-x   8 root root  4096 Feb  4 22:53 opt
drwxr-xr-x   2 root root  4096 Jan  5  2023 proc
drwxr-x---   6 root root  4096 Mar 23 17:21 root
-rw-r--r--   1 root root  5289 Dec 23  2022 rootfs-pkgs.txt
drwxr-xr-x   2 root root  4096 Jan  5  2023 run
lrwxrwxrwx   1 root root     7 Dec  2 16:33 sbin -> usr/bin
drwxr-xr-x   4 root root  4096 Dec 23  2022 srv
drwxr-xr-x   2 root root  4096 Jan  5  2023 sys
drwxr-xr-x   9 root root  4096 Mar 10 21:02 timeshift
drwxrwxrwt   2 root root  4096 Jan  5  2023 tmp
drwxr-xr-x   9 root root  4096 Mar 23 17:16 usr
drwxr-xr-x  13 root root  4096 Mar 23 17:00 var

it seems to have a copy of my home folder? I have the home folder as set to ignore in the gui. Is this because I am using rsync? Why does it have this whole separate backup when I have the /timeshift/snapshot folder? It seems to update anytime I update something in my regular /home/user.

Also it seems to include the /timeshift/snapshot folder

73G     run/timeshift/10816/backup/timeshift/snapshots/2025-03-23_17-56-56

Also here is the settings json

cat timeshift.json                                                                                                                                                             ✔ 
{
  "backup_device_uuid" : "3e6e4c0f-26d2-4b14-af4a-9bee693e02f7",
  "parent_device_uuid" : "",
  "do_first_run" : "false",
  "btrfs_mode" : "false",
  "include_btrfs_home_for_backup" : "false",
  "include_btrfs_home_for_restore" : "false",
  "stop_cron_emails" : "true",
  "schedule_monthly" : "false",
  "schedule_weekly" : "true",
  "schedule_daily" : "false",
  "schedule_hourly" : "false",
  "schedule_boot" : "false",
  "count_monthly" : "2",
  "count_weekly" : "2",
  "count_daily" : "5",
  "count_hourly" : "6",
  "count_boot" : "5",
  "snapshot_size" : "0",
  "snapshot_count" : "712223",
  "date_format" : "%Y-%m-%d %H:%M:%S",
  "exclude" : [
    "/home/user/**",
    "/var/lib/ollama/**",
    "/home/**",
    "/root/**"
  ],
  "exclude-apps" : []
}% 

No idea about run, i think it’s in memory/virtual location, so it is probably showing timeshift just ran and does not really exist. Besides du is not the right tool for calculating timeshift as it counts the hardlinks.
Me personally, i keep the packet cache clean. That could become another 5-10 gigs at least.
Another think to consider is the logs (another 4 gigs if not limited) and the coredumps. If ollama ever crashed that would be another several, maybe even 10 gigs coredump in the root.

1 Like

The contents of /run are on a tmpfs — a filesystem in virtual memory — and among other things, it serves as the parent directory to the mountpoint for the volume containing the snapshots, i.e. /run/timesdhift.

Flatpaks certainly consume a lot of space, and in my personal opinion, they’re not worth backing up, because they are completely containerized standalone applications.

You may also want to exclude /var/cache. Anything below that directory is by definition expendable and can easily be recreated.

/home is a directory in the root directory. It is not the same thing as your home directory, which is a directory under /home.

They are hard-links, not files. A hard-link is just another filespec — i.e. filename and path — for an already existing file. See the tutorial below… :point_down:

As @Teo said, you should not rely on du for this purpose.

1 Like

What would you recommend over du that takes into consideration this use case?

df is much more reliable, albeit not with btrfs, but you’ve stated that you don’t use btrfs, so that particular discrepancy is not something you should worry about. :wink:

1 Like

@vikinbread

you have the home folder as set to ignore in the gui.
Isn’t the home directory zero-sized?

❱ echo $PWD
/media/ST15/timeshift/snapshots/2024-10-24_08-52-14/localhost/home

❱ sudo btrfs fi du $PWD
     Total   Exclusive  Set shared  Filename
     0.00B       0.00B           -  /media/ST15/timeshift/snapshots/2024-10-24_08-52-14/localhost/home/.snapshots
     0.00B       0.00B           -  /media/ST15/timeshift/snapshots/2024-10-24_08-52-14/localhost/home/RUNRUNRUN
     0.00B       0.00B           -  /media/ST15/timeshift/snapshots/2024-10-24_08-52-14/localhost/home/xish
     0.00B       0.00B           -  /media/ST15/timeshift/snapshots/2024-10-24_08-52-14/localhost/home/eee
     0.00B       0.00B           -  /media/ST15/timeshift/snapshots/2024-10-24_08-52-14/localhost/home/zikish
     0.00B       0.00B           -  /media/ST15/timeshift/snapshots/2024-10-24_08-52-14/localhost/home/transit
     0.00B       0.00B           -  /media/ST15/timeshift/snapshots/2024-10-24_08-52-14/localhost/home/manjzish
     0.00B       0.00B       0.00B  /media/ST15/timeshift/snapshots/2024-10-24_08-52-14/localhost/home

https://www.reddit.com/r/btrfs/comments/l9l2sl/btrfs_fi_usage_vs_fi_du/

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.