Mint 21.1 Vera, MATE 64 bit
I've been trying to compress a Timeshift snapshot on an external drive so I can free up more space on that drive. I haven't been having much success. I'll explain below what I tried, but it doesn't seem to have worked and I can't figure out why.
I took the existing image, the Timeshift directory on an ext4 partition of the drive and did
sudo dd if=/dev/sdb1 of=/home/username/timeshift_img/Backup.img status=progress
This copied without error. And I was able to mount it, which had it looking just like the original partition when I did so. But I note that on the original partition there must have been some sort of permissions which meant some folders had padlock symbols shown on them in the caja GUI, whereas when browsing the img file once mounted all the folders showed normally, though as dd makes an exact copy it surely must have preserved permissions in practice.
I then compressed that img file using 7zip
7z a BackupCompressed.7z Backup.img -mx=3
which worked.
So now it was time to test. I went to a second computer and on it created a VM (Oracle Virtual box) as I had no spare actual machine to test on, and installed default Mint 21.1 Mate 64 bit in to it, I ensured the VM had the same sort of partition structure and the same partition names as the system from which the Timshift snapshot was taken.
I put the 7z file on a USB, brought it across.
On this PC I uncompressed the 7z to make the img file again.
I put shared the img file in a read and write capable way with the guest of the VM, specifically I put it on another external HDD and then gave the VM USB port access via which to access this external HDD.
Within the VM I mounted the img file so it showed as a dev/loop0 drive inside the VM, looking just like the original partition had, but with no padlock logo superimposed on the folder logo when browsing.
In the guest I opened Timeshift, and it did detect this snapshot, showing correctly the time and date of the snapshot and the associated comment.
So I tried to restore from it, it appeared to work, but then it got to the final stage and clicking next then, rather than starting a long copying process, skipped straight to the very last stage in which it said it had completed, despite not having done anything, even though at an earlier stage it had corectly listed all the files it would be deleting/creating/modifying.
Also, in Timeshift while the snapshot was found and shown to be on the /dev/loop0 drive, I could not in the Settings pop up window get Timeshift to list the /dev/loop0 device, it listed only the virtual partitions of the VM and the existence of the plugged in external HDD. This view of Timeshift's settings didn't show the /dev/loop0 mounted img file, yet Timeshift's main window found it well enough.
What went wrong?
How come the permissions padlock wasn't shown in the dd 'd copy?
Why did Timeshift see the Timeshift image within the mounted img file, and ist the changes to make when restoring from it, but then take zero time to complete and in the process not restore to the Timeshift snapshot at all?
My end goal is to be able to get Timeshift snapshots saved iside of 7z (or zip or other compressed older file types) which can be saved on ntfs drives, rather than needing to have a whole ext4 partition to live on. I don't mind if when I want to use the snapshots I have to spend a while decompresing them via a series of copies, I just want to make sure they work however the snapshot has been stored in the meantime.
Thanks
Edited by rp88, Yesterday, 08:31 PM.