using Timeshift to move an image

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
majpooper
Level 8
Level 8
Posts: 2084
Joined: Thu May 09, 2013 1:56 pm
Location: North Carolina, USA

using Timeshift to move an image

Post by majpooper »

I am in the process of upgrading my sister's laptop from a HHD to a SSD. Can I take a Timeshift snapshot of the entire system to include /home/user from the HHD and then after installing the SSD load the Timeshift snapshot onto the SSD?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Aztaroth
Level 5
Level 5
Posts: 764
Joined: Mon Jan 11, 2021 1:48 am

Re: using Timeshift to move an image

Post by Aztaroth »

I'll closely follow this thread because I'm interested in Timeshift expert answers too.

Just for the record, even if a little out of the topic, I went through posts where guys spoke of a tool named Foxclone.
On this page :
https://foxclone.com/download.php
clicking on Read the file will display Foxclone's manual and let you know if it may be useful.

Also bumped in a post stating AndyMH is the (or one of the) developer of Foxclone. Can also be useful to know.
dual boot LMDE4 (mostly) + LM19.3 Cinnamon (sometimes)
motoryzen
Level 10
Level 10
Posts: 3469
Joined: Sun Dec 08, 2019 12:25 am

Re: using Timeshift to move an image

Post by motoryzen »

It is true that AndyMH is the if not one of the Foxclone devs. I was having a problem with Foxclone many months back and Andy kept fast good communication with me helping me out with it.

The only thing I don't recall is the main difference in a " Backup" vs " Clone" using Foxclone. Andy? Are ya out there bud? :D
Mint 21.2 Cinnamon 5.8.4
asrock x570 taichi ...bios p5.00
ryzen 5900x
128GB Kingston Fury @ 3600mhz
Corsair mp600 pro xt NVME ssd 4TB
three 4TB ssds
dual 1TB ssds
Two 16TB Toshiba hdd's
24GB amd 7900xtx vid card
Viewsonic Elite UHD 32" 144hz monitor
User avatar
Pierre
Level 21
Level 21
Posts: 13215
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: using Timeshift to move an image

Post by Pierre »

you can use Foxclone to make an backup of your drive,
https://foxclone.com/download.php
or you can use an Imaging program as well.
viewtopic.php?f=42&t=319764
Image
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.
Kendoori
Level 5
Level 5
Posts: 748
Joined: Thu Jul 09, 2009 12:51 pm
Location: Sanibel, FL USA

Re: using Timeshift to move an image

Post by Kendoori »

TimeShift's developer has a different package that addresses this specifically. I highly recommend Aptik: https://www.makeuseof.com/backup-linux-with-aptik/ Note this requires a license fee; however, I'm happy to subsidize Tony's work.
sanmig
Level 5
Level 5
Posts: 536
Joined: Tue Dec 04, 2018 8:27 am

Re: using Timeshift to move an image

Post by sanmig »

majpooper wrote: Thu Jul 29, 2021 7:02 pm ... upgrading my sister's laptop from a HHD to a SSD.
This is not the domain of Timeshift.
I’d recommend Foxclone, as it is fast, simple and reliable.
Foxclone must be booted from DVD or USB to act on your OS.
First create a “Backup”, be sure to select the full drive (all partitions).
motoryzen wrote: Fri Jul 30, 2021 1:42 am The only thing I don't recall is the main difference in a " Backup" vs " Clone" using Foxclone.
A Foxclone (full) Backup contains everything to reproduce the full source drive (but not the content of unused space, like deleted files).
A Foxclone Restore will restore the Backup to the original drive only (kinda protection).
A Foxclone Clone (file to drive) will clone from Backup (files) to any drive, new or occupied, take care!
Foxclone also has a direct cloning, on the flight, from drive to drive - no backup made, if there is a problem (power failure, …) you may be screwed (both drives).
In any case, to restore/clone the target must have at least the size of the source.
Probably one could shrink the last partition beforehand if that helps with drive space.
MAlfare

Re: using Timeshift to move an image

Post by MAlfare »

sanmig wrote: Fri Jul 30, 2021 6:39 pm Foxclone also has a direct cloning, on the flight, from drive to drive - no backup made, if there is a problem (power failure, …) you may be screwed (both drives).
Please explain why both drives in: you may be screwed (both drives).
motoryzen
Level 10
Level 10
Posts: 3469
Joined: Sun Dec 08, 2019 12:25 am

Re: using Timeshift to move an image

Post by motoryzen »

@sanmig

Thanks for the details :D Cheers.
Mint 21.2 Cinnamon 5.8.4
asrock x570 taichi ...bios p5.00
ryzen 5900x
128GB Kingston Fury @ 3600mhz
Corsair mp600 pro xt NVME ssd 4TB
three 4TB ssds
dual 1TB ssds
Two 16TB Toshiba hdd's
24GB amd 7900xtx vid card
Viewsonic Elite UHD 32" 144hz monitor
Aztaroth
Level 5
Level 5
Posts: 764
Joined: Mon Jan 11, 2021 1:48 am

Re: using Timeshift to move an image

Post by Aztaroth »

sanmig wrote: Fri Jul 30, 2021 6:39 pm First create a “Backup”, be sure to select the full drive (all partitions).
So it would seem possible not to select all partitions.
I'll try to explain starting from my own configuration, running dual-boot LMDE4 / Mint 19.3 on a fairly shared 500 Gb SSD (240 each + 20 swap)

Here are the partitions from a LMDE4 point of view. Of course, there's a missing /dev/sdc4 beeing the Mint 19.3 partition.

Code: Select all

/dev/sdc1        vfat       511M     10M  502M   2% /boot/efi
/dev/sdc2        ext4        67G     12G   52G  18% /
/dev/sdc3        ext4       173G     12G  152G   7% /home
Is it possible to clone only one OS, ignoring for example sdc4 if I only want to clone LMDE4 ?

PS : I only speak of the possibility to do this. I understand the place is not to set a complete tutorial. Just knowing this can be done will push me to investigate further.
Thanks in advance for any answer.
dual boot LMDE4 (mostly) + LM19.3 Cinnamon (sometimes)
Aztaroth
Level 5
Level 5
Posts: 764
Joined: Mon Jan 11, 2021 1:48 am

Re: using Timeshift to move an image

Post by Aztaroth »

Is it possible to clone only one OS, ignoring for example sdc4 if I only want to clone LMDE4 ?
Found my answer in RTFM page 21 :
52. Foxclone gives the user the choice on what partitions to backup and what to
restore. With this flexibility comes the responsibility to ensure the backups
held are sufficient. The first backup should always be a full backup.
dual boot LMDE4 (mostly) + LM19.3 Cinnamon (sometimes)
Petermint
Level 9
Level 9
Posts: 2979
Joined: Tue Feb 16, 2016 3:12 am

Re: using Timeshift to move an image

Post by Petermint »

Timeshift can be used to backup user data, the same as Backintime. The problem is the restore. If you have to use Timeshift to restore from a problem software update, all your user data is reverted back to the same point. So keep user data in a separate backup.

Timeshift will backup with permission root. Backintime will backup as the user. If you use Timeshift to backup user data, the restore can change all the user data to be owned by root.

You can backup your current system, the hard disk, using Timeshift and Backintime, then perform a clean install on the SSD, including reallocating partitions, then restore all the system settings from Timeshift and user files from Backintime.

This means you need the live boot, the Timeshift snapshot, and the Backintime snapshot. The main advantage is changing boot and partition layouts. Some of the other partition copy products give you only an exact copy.

Are you going up in size or down? If the SSD is smaller and you perform partition copies, you need to shrink partitions before the copy. When you use the clean install then Timeshift, the new disk can be any size.
sanmig
Level 5
Level 5
Posts: 536
Joined: Tue Dec 04, 2018 8:27 am

Re: using Timeshift to move an image

Post by sanmig »

MAlfare wrote: Fri Jul 30, 2021 7:26 pm ... why both drives in: you may be screwed (both drives).
Well, no hard evidence, more a feeling.
Years ago it happened to me (Win SW, not Foxclone). Not sure if it was a power or USB cable glitch, the (USB+SATA adapter) source drive’s NTFS was corrupted (but could be repaired by Win’s chkdsk).
Yes, it may happen at backup, too, but I’ve never experienced any issues at taking backups, even when I saw an error message after returning to the scene.

Aztaroth wrote: Sat Jul 31, 2021 1:07 am possible not to select all partitions.
Yes, that’s both, feature and danger:
If you didn’t change the drive’s partitions (the partition table) in the meantime you can restore only one single partition out of a (e.g. full) backup, on the other hand one could overwrite valuable data …
User avatar
AndyMH
Level 21
Level 21
Posts: 13704
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: using Timeshift to move an image

Post by AndyMH »

So it would seem possible not to select all partitions.
Without seeing the detail of your drive - post the output from sudo parted --list, I can't comment objectively.

Clone drive to drive will do the whole drive. Cloning from a full backup - I've only testing restoring all partitions, although I can't think of a reason why it shouldn't work. Also can't think of a reason why you would want to do that.

The major caveat on cloning (either drive to drive or from a backup) is that the destination must be the same size or larger than the source. If the destination is smaller you need to shrink the partitions on the source so that the last partition ends at a point that is smaller than the destination drive.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
Aztaroth
Level 5
Level 5
Posts: 764
Joined: Mon Jan 11, 2021 1:48 am

Re: using Timeshift to move an image

Post by Aztaroth »

AndyMH wrote: Sat Jul 31, 2021 7:41 pm Without seeing the detail of your drive - post the output from sudo parted --list, I can't comment objectively.
Thanks for an offer I gladly accept.

Code: Select all

Model: ATA CT500MX500SSD4 (scsi)
Disk /dev/sdc: 500GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name                  Flags
 1      1049kB  538MB   537MB   fat32           EFI System Partition  boot, esp
 2      538MB   40,5GB  40,0GB  ext4
 4      40,5GB  104GB   63,5GB  ext4
 5      104GB   207GB   103GB   ext4
 6      207GB   483GB   276GB   ext4
 3      483GB   500GB   17,3GB  linux-swap(v1)
Comments about the partitions : LMDE4 is 2 and 4 (/ and home), Mint 19.3 is 5, and 6 a special partition called HOME-SH, mounted at boot on both systems, in which are stored almost all my docs so they can be accessed by both systems without having to nose in each other's home.

I did a fresh install of both in the last 15 days. My needs are not a clone in case of any disaster (I've 2 other computers and I would be really unlucky if all three, including the external doc backup disk should fail at the same moment).
What I'm looking for is a cloning process of a working system I can transfer on any computer 'at will', sparing me all the downloads of updates, uninstalling unwanted apps, installing needed ones, doing settings... 'Fine tuning' would be done of course by Timeshift, meaning just after cloning, I'd create a Timeshift backup with 'Clone Point' in the comment.
So :
- Partition 6 has no interest being cloned : the files in it change constantly and a regular rsync twice a week does the backup job.
- about what I read in the manual, Foxclone doesn't clone the swap but recreates it on the host disk.
- Meaning only part 1,2,4,5 could be interesting to clone.

Thanks for any comment or tip.
dual boot LMDE4 (mostly) + LM19.3 Cinnamon (sometimes)
User avatar
AndyMH
Level 21
Level 21
Posts: 13704
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: using Timeshift to move an image

Post by AndyMH »

What I'm looking for is a cloning process of a working system I can transfer on any computer 'at will'
To the best of my knowledge it doesn't exist. Veeam might do it, but this is enterprise level stuff and when I last looked a couple of years ago, the linux implementation was terminal only. The problem with image cloning or backing up a live system is you have to find someway of locking the filesystem while running your software. It can be done at the file level with utilities like rsync, but you still need to create the destination partitions, format them and install a boot loader. Not trivial. It is something I've been thinking about, but I've got to finish a rewrite of foxclone first. If I was to do it - 2022 at the earliest.

Yes, foxclone automatically re-creates the swap partition with the correct UUID.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
sanmig
Level 5
Level 5
Posts: 536
Joined: Tue Dec 04, 2018 8:27 am

Re: using Timeshift to move an image

Post by sanmig »

AndyMH wrote: Sat Jul 31, 2021 7:41 pm Clone drive to drive will do the whole drive. Cloning from a full backup - I've only testing restoring all partitions, although I can't think of a reason why it shouldn't work. Also can't think of a reason why you would want to do that.
Yep, with cloning (as it is now) one can’t select single (source) partitions, and it would be fatal to clone e.g. partition 5 from a GUID to MBR drive …
At "Restore" it is possible to restore a single partition. With Foxclone, it must be the very same target drive, the n00b’s protection can’t be switched off easily, and, if different, the partition table would be restored anyway.

- But restoring only one partition is very handy, thanks :D
Win10 updates often stuck, realigning only after days and several attempts. But sometimes (esp. after months without connecting to the Internet) it goes down to panic screen, neither forth nor back, the end (reinstall). With all data on D:\ (advisable!), only the C:\ partition has to be restored, Data, EFI, Win, recovery and manufacturer partitions are not touched, very fast.
Aztaroth wrote: Sun Aug 01, 2021 2:20 am What I'm looking for is a cloning process of a working system I can transfer on any computer 'at will',
I did not understand that as “cloning myself’s partition onto an other drive” but as to “clone an image of (myself’s partition) to an other drive” (and probably change the partition number on the flight)?
Anyway, it’s not possible.
Locked

Return to “Software & Applications”