Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Generic User Avatar

Compressing a Timeshift image, why is it failing


  • Please log in to reply
1 reply to this topic

#1 rp88

rp88

  •  Avatar image
  • Members
  • 3,717 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Local time:01:13 AM

Posted Yesterday, 08:31 PM

By hell this must be possible somehow!!!

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.

Back to visiting this site, every so often, been so busy in previous years.

BC AdBot (Login to Remove)

 


#2 Naught McNoone

Naught McNoone

  •  Avatar image
  • Members
  • 668 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:The Great White North
  • Local time:09:13 PM

Posted Today, 02:14 PM

@rp88

 

I was under the impression that Timeshift for Linux worked something like System Restore for Windows.

 

That is, it takes a "snapshot" of the existing system, and creates a restore point for that system.

 

So, if you change something and the system stops working, then you can revert to that point in time.

 

I don't think that it includes the content of /home directories.  I could be wrong.

 

That being said, transferring a Timeshift file to another system will not work, because it needs the original system HDD it was made on.

 

Timeshift will be looking to restore files from a file system table, that does not match the different, (new), HDD.

 

Hence, when you tried to restore, Timeshift had nothing to do.

 

Cheers!

 

Naught

 






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users