Please let me understand one thing.
I'm going to start from the fact that basically I was runing Ubuntu on my computer which was equipped in 120 GB SSD drive. Then I've decided to make back up of my system with use of Timeshift (which is my favourite tool for that). Because of that from longer time my disk was suffering and constantly reported out of space. One time even crushed badly , but restoring from snapshot helped.
So it was finally time to buy a new 1TB SSD (Goodram brand).
I've created 4 patition as bellow picture shows:
Gparted view
As you can find out /dev/sda2
is my main system (Ubuntu /).
/dev/sda4
is a pratition with my snapshots
Output of df-H command:
tmpfs 823M 2,3M 821M 1% /run
/dev/sda2 275G 171G 92G 66% /
tmpfs 4,2G 189M 4,0G 5% /dev/shm
tmpfs 5,3M 4,1k 5,3M 1% /run/lock
/dev/sda1 536M 5,5M 531M 2% /boot/efi
/dev/sda4 518G 71G 421G 15% /mnt/Timeshift
tmpfs 823M 267k 823M 1% /run/user/1000
/dev/sda3 218G 159M 218G 1% /media/zawier/Dokumenty Ubuntu
On old ssd snapshots size was around ~ 60GB, that's allow us thinking that system +all apps + docs was another 60GB.
Moved all backups to a new partition /dev/sda4
. Currently I have 5 of them:
sudo timeshift --list
/dev/sda4 is mounted at: /run/timeshift/backup, options: rw,relatime
Device : /dev/sda4
UUID : 4bf343eb-b0d3-42c6-9a81-db7faa521367
Path : /run/timeshift/backup
Mode : RSYNC
Status : OK
5 snapshots, 447.3 GB free
Num Name Tags Description
---------------------------------------------
0 > 2022-06-18_11-00-01 W M 20.04 Focal
1 > 2023-02-18_00-00-01 M
2 > 2023-02-20_19-00-01 W Przed wymianą dysku na 1TB
3 > 2023-02-25_06-50-51 O Po wymianie dysku
4 > 2023-02-25_11-35-53 B Nowy GRUB
I'm aware that Timeshift's snapshots includes symbolic and hardlinks. That's why the only way to copy them properly is :
sudo rsync -aHXAS --info=progress2 /timeshift /mnt/Timeshift/
To keep it consistent and avoid copying the same file multiple times (had that issue with Timeshift on Linux Garuda where simples rsync from total 490GB of snapshots tried copy 2,9 TB :) Madness!)
Let's keep going. So my copied Ubuntu back ups on a new partition take around ~60GB:
Timeshit folder properties
Disk utility
Here output of mount |grep timeshift
:
/dev/sda4 on /run/timeshift/backup type ext4 (rw,relatime)
Checking ncdu /mnt/Timeshift/
we get:
ncdu Timeshift backup partition
Why /dev/sda4
point on /run/timeshift/bacups
while it's mounted on /mnt/Timeshift/
?
And why it's linked with 2 destinations? Any idea? Why it can't point just only /mnt/Timeshift/
?
Next is output on ncdu /
:
ncdu /
As you see size is around 200GB while it's litteraly almost the same system which was stored on the previous 120GB SSD! Please keep in mind that also I have removed here folder /timeshift
. That's why I was expecting decreasing of total size to 60GB as result. Finally system space was rised up!
Why? Can anybody explain it to me what happened here, please? From my perspective it's just illogic! :)
How Ubuntu calculate used space? Does mounted folders also included into total space even if they are on separate partition?