Timeshift & Similar Solutions - Safeguard & Recover Your Linux

Aah, thanks for the clarification. I have Garuda Linux with BTRFS.

Avagudweegend.

Wiz
 


Andy @captain-sensible :
Tony George's Releases page has a new look about it, you could try the following:
Scroll down to v19.01 and click where it says
Assets (6), screenshot follows
Download the .run file that suits your environment.
Then use it in conjunction with reading this article, and let us know how it goes.
https://alt.os.linux.slackware.nark...ckup-and-python-programming-on-slackware-14-2
Cheers
@wizardfromoz
I finally got timeshift working ; after taking the "scenic route" . I did have a dual boot of slackware and Arch on my laptop but now only running Arch. I got timeshift from AUR Arch repo.

Regarding Slackware i do have a usb stick running Slackware live (current) so I tried running the run file for slackware following your link . Basically there were mis matches for deps.

On my laptop i tried using a 64gig usb stick but timeshift took all night then failed to create a snapshot. I got a 32 gig Sd card actually a 32 gig SDHC card rated 120 MB/second. That took 20 minutes to create a snapshot and i tested by selecting that snap shot and restore from menu (but not going through with it) It look like a have a valid snapshot . Not sure what the fancy SDHC is but i think its to do with SD card aimed at cameras and high definition.

So i have a snapshot on a SD card I can access, and a running timeshift program on my Arch OS; so that means if I can boot my laptop but thats if things go "astray"; i guess i can use timeshift to go back in time. I guess the real interesting stuff would be if i can't boot my laptop. I'm thinking the route to take in that case would be that i don't necessarily need a live USb OS that has timeshift installed but that I would use the live usb OS mount my main Arch install partition on my laptop(/dev/sda4) using the usb OS; chroot the mounted /dev/sda4 and then i should be able to evoke timeshift from my laptop and hope it could access the SD card (maybe have to mount that as well) and all would be well or is there an easier way in that scenario ?
 

Attachments

  • Screenshot_timeshift.png
    Screenshot_timeshift.png
    283 KB · Views: 583
Good work so far, Andy :)

I guess the real interesting stuff would be if i can't boot my laptop.

Simplest thing in most circumstances is, if you are able to boot to a Live USB stick - to have a Mint Live or a Linux Lite Live on hand. Both of these have Timeshift installed, they will warn that they are Restore Only (can't take a snapshot), which is all you want.

Once launched, you can then navigate to where you have your Snapshots stored, and use the stick to restore your Slackware.

Basically there were mis matches for deps.

Would that have issued something like the below?

Following packages could not be installed. Please install these manually:

> libgee-0.8-2

> libvte-2.91-0

> libjson-glib-1.0-0

> rsync

(Version numbers might be a little different).

Does

Code:
slackpkg info

provide that sort of infrmation?

If not, you could go to pkgs.org enter the search items, and pick from what is offered for 14.2

Cheers

Wiz
 
Once launched, you can then navigate to where you have your Snapshots stored, and use the stick to restore your Slackware.
Apart from slackware live on a usb stick i'm not running Slackware any more - my OS is now Arch vanilla. Its been about 3 weeks using it now using Arch with no problems. the only caveat with Arch are the daily downloads. But my thinking is you can't have it "all ways" so its worth putting up with. In theory due to rolling release i never have to install again. I have Debian OS Buster on a usb stick with persistence so i think i will try to install Timeshift to that.

I could install deps to slackware live on usb but it means getting Slackbuilds, manually building each dep. i'm getting lazy now using Pacman on Arch
 
Apart from slackware live on a usb stick i'm not running Slackware any more - my OS is now Arch vanilla.
What made you decide to move from Slackeware to Arch, this question may be off-topic here but otherwise share it in a post in the Arch section why you switched to Arch.
 
I thought you were still running Debian because you preferred it?
I still do have Debian, and KDE Neon Testing. I installed endeavourOS in another partition. I'd been tinkering with the idea of installing arch for a while, then I read a review about endeavour, asked a few questions in their forum, and decided to give it a try. So far, so good. And I remembered why I like arch so much; pacman is great, pretty fast and full feature, and I don't know why, but arch's repos seem to be the fastest, well at least for me that is. I didn't really "prefer" Debian, it's just that at the time it was easier for me to install it(Q4OS)than spending the time to make arch the way I had it, but since I'm using KDE now(I used XFCE + awesome-wm)with pretty much the defaults ... I was able to install a very minimal KDE, which is just what I wanted. :)
 
Good work so far, Andy :)



Simplest thing in most circumstances is, if you are able to boot to a Live USB stick - to have a Mint Live or a Linux Lite Live on hand. Both of these have Timeshift installed, they will warn that they are Restore Only (can't take a snapshot), which is all you want.

Once launched, you can then navigate to where you have your Snapshots stored, and use the stick to restore your Slackware.



Would that have issued something like the below?



(Version numbers might be a little different).

Does

Code:
slackpkg info

provide that sort of infrmation?

If not, you could go to pkgs.org enter the search items, and pick from what is offered for 14.2

Cheers

Wiz
The way i went was - I had an already ventoy formated usb stick with spare space. I used ventoy script to update to ventoy-1.0.46 then i drag and dropped Mint Cinnamon see attached image. I set up persistence with json and a 1gig dat file.

I confirmed persistence on re-booting and found it remembered my wifi passphrase. I then went through process of:

Code:
sudo apt install software-properties-common
sudo apt-add-repository -y   ppa:teejee2008/ppa
sudo apt-get update
sudo apt-get install timeshift
Only to find Timeshift was already installed.

if anybody wants an example of my json file and commands i went through for ventoy let me know
 

Attachments

  • Screenshot_Mint_Ulyssa.png
    Screenshot_Mint_Ulyssa.png
    162.8 KB · Views: 515
Noted all the above.

Andy, you will get better performance on Arch (over a USB stick) by installing Timeshift directly on it.

Have you made the acquaintance yet of

yay

?

Related to Pacman but allows you to access the AUR (Arch User Repository)

Steps to install Yay on Arch Linux:

  • Update your system:
    sudo pacman -Syyu
  • Install Git:
    sudo pacman -S git
  • Clone the repository:
    git clone https://aur.archlinux.org/yay.git
  • Move to the directory:
    cd yay
  • Build it:
    makepkg -si
  • Then to install Timeshift
Code:
yay -S timeshift

Yay will prompt you when it needs a password.

Wiz
 
Hi Chris @wizardfromoz ,

yes I already have timeshift installed on Arch - i didn't go the yay route , simply git cloned the link for one of timeshift on AUR to get a pkgbuild for it and then ran makepkg -s

I did install yay also , after a pacman upgrade yay wasn't working for a few days so for the few pkgs i have from AUR i just used " git pull " from inside particular pkg directory and rebuild using pkgbuild script. Yay is now back working so i now use:

Code:
$ yay  -Syu

That command is the same as pacman -Syu; the difference i read is that pacman -Syu only updates packages from the offical repo, whereas yay -Syu also updates packages from the offical repo and ALSO from AUR

The idea of having timeshift on Mint usb was for the possible chance of laptop not even booting and trying timeshift that way. If things go haywire but i can still boot , then i will try using timeshift which is installed on Arch.

I like to have solutions for every eventuality ; so I have already tested re-stalling grub uefi mode if need be, from a liveOS on a usb and that went well. So i think i have figured out and am ready for most glitches

The pkgbuild script has a common theme with a slackbuild script so i'm also looking into how that works. Then if i find something on git that is not already in AUR i might have a go

By the way i'm guessing that on your rig running 100+ OS slackware must now be one of them ? current or 14.2?
 
Last edited:
The Linux file system BTRFS (as opposed to EXT4) was mentioned recently here with regard to Snapper, a snapshot facility available under certain Distros, and how it works on BTRFS.

That begs the question whether Timeshift can work under BTRFS, and the answer is

Yes and No

Tony George has provided a limited facility for dealing with BTRFS, but it is by no means near as flexible as that provided under the Rsync-engineered EXT4 facility.

BACKGROUND

... to this Post can be read here

https://linux.org/threads/how-and-s...-unwanted-items-e-g-400gb-steam-folders.35748

There, the OP, @MariusContusor is seeking how to exclude his Steam Games folder/s and files (stored in Home) from being captured in Timeshift snapshots because the volume involved is depleting space rapidly on his drive.

Before I go further, my disclaimer here is that I have next to no knowledge on BTRFS. Of my 67 or so Distros I run, one only of them is BTRFS and that is Garuda (Arch-based) which is also used by the OP.

After taking one Timeshift snapshot, and noting its differences in configuration presented to that of "the usual" - I decided the learning curve was too great for me to embark on at that time, and restored one of my favourite distros (using Timeshift of course) to take back the primary partition on Grub, that is, the one at the top of the menu.

Since I did that, around 18 May last, I cannot get into Garuda by the usual means of Grub Menu (it's not appearing there), and I have not the time for now to explore further.

So the rest of what follows is, if not speculation, then an educated guess. :)

The casual user of Timeshift, even experienced users, under its "regular" mode, might wonder -

Why doesn't he redirect Timeshift to store the snapshots on another drive? After all, that is what Tony George recommends as best choice?

or

Why doesn't he use the Filters tab to exclude from his Home folder/partition the Steam folders and files from the snapshotting?

BUT

(Wizard's but is seldom far behind him)

We Rsync-EXT4 users can determine something about how Timeshift works under the BTRFS environment without having to leave the sanctity of our own, using Settings.

Here is the front screen from this Linux Mint I am currently writing from, as seen the first time we use Timeshift, or by invoking the Wizard (not me, Timeshift's).

NRFJd1z.png


Now if you click next, and then choose Settings from the available tabs at top, you get the following


OkTo4TA.png


Note those 6 tabs at top.


Now if we have chosen BTRFS at the entry point, let's see what we get


JzSKXIV.png


Spot the difference? 5 tabs instead of 6, and missing is

Filters

Without the filters facility, you cannot exclude directories or files that are globally captured under a snapshot. If the OP has Home (known as @home under BTRFS) included in the snapshots he cannot exclude the Steam bulk volume from the operations. Hence the gobbling up of his hard drive.

Is there the option to include or exclude Home from the snapshots?

Let's take a look.

IvDPfUs.png



Yes, there is, under Users.

SUMMARY

It is my opinion that the OP has the box ticked for Include @home subvolume in backups. Under his current setup, he is always going to face this dilemma with Timeshift under BTRFS.

I have to fly but I will be back with Recommendations on my tomorrow.

Perhaps when @MariusContusor gets the opportunity, he can comment on whether my deductions are correct, or if incomplete or wrong, fill in the gaps?

Cheers for now

Wizard
 
One of the screenshots I was unable to provide in the previous Post (because I no longer have Garuda on board) was what lies under the Location Tab in Settings.

From memory (and @MariusContusor could confirm this), there is no option to store the Timeshift snapshots taken, other than in his Home subvolume, this may have a path similar to

/@home/Timeshift

So there is no option to store the snapshots elsewhere on his drive, or better still, on an alternative drive or external drive.

RECOMMENDATIONS


This is just from a bit of brainstorming, and the recommendations are not in any particular order, although they are numbered here simply for ease of reference to the OP and to me. If anyone else has other options from their own environment that they have tested, they can contribute them for consideration. :)
  1. First thing is to either stop the scheduled snapshots, or modify their configuration to exclude @home for the time being. You don't need to have your disk fill up to the point where you cannot boot it.
  2. If the OP wants to stay with Garuda, then consider implementing the openSUSE-produced tool, Snapper, which was suggested by @Tolkem at the OP's Thread.
  3. More suggestions to follow
Wizard
 
Can I perform a Timeshift restore without the grub reinstallation that comes at the end?
I am asking because one of my partitions has Arch linux, or more exactly, EndeavorOS.
I did a Timeshift restore on my Ubuntu partition, and even though Arch does appear as an entry in the Ubuntu grub, it doesn't actually work. I just get a black screen.
And, somehow or other, the native Arch grub got messed up as well. Strange but true. So I needed to pull out my live usb in order to re-grub the Arch installation.
 
Can I perform a Timeshift restore without the grub reinstallation that comes at the end?
Yes, you can, and as a matter of fact, I think you should when running more than 1 distro in the same box. I did so around a month ago. I use Endeavour too, though I didn't have it installed at that time. I posted the procedure here https://www.linux.org/threads/times...afeguard-recover-your-linux.15241/post-125213 I think, Endeavour being arch based, has a newer grub, and I kind of remember reading something about issues of the kind you're facing because of this. Boot to Ubuntu and update grub
Code:
sudo update-grub
and see if that helps. Also, read here https://bbs.archlinux.org/viewtopic.php?id=255190 and here https://averagelinuxuser.com/dual-boot-arch-linux-with-linux/
 
I just did a new snapshot of timeshift for vanilla Arch . i now just use the command line . One downside of Arch is the frequency of updates and therefore in theory the frequency of
new snapshots. I'm going to stop updating daily and go to weekly. IN theory the system should go straight from where the system is, to latest. Now i also did a dry run of restore but not fully going through with it. I opted to re-store grub . One thing i noted is that , if you look at my screenshot if i just hit the return button , it looks like it would have written grub to the MBR , which is not what i would have wanted since i have a uefi system .

I guess my choice would have been /dev/sda1 which is my efi partition. I was too chicken to go through with it! Well everything is fine why take the chance and mess things up.


Unless i'm miss-understanding timeshift "grub device" is where you want grub to be installed to !

update : ended up using Timeshift to restore for first time ever. Luckily i just did a new snapshot ; i made a mistake running composer with sudo , which messed up a web dev.
I went for restore to main install and grub; i chose /dev/sda1 which is the partition of efi .
I must say i'm very impressed with TimeShift . Fixed and booted back up no problem .
 

Attachments

  • timeshift.png
    timeshift.png
    735.8 KB · Views: 509
Last edited:
So I opened my eyes and noticed that TimeShift gives you an advanced options menu to pick and choose your poison your grub options.
So this time, I unticked everything in that menu, and performed a restore on a perfectly working 20.04 Kubuntu system, restoring it to 21.04 Ubuntu.
This time I got successfully to the grub screen, but the Ubuntu entry let me to a black screen with an obscure error message that I failed to take a pic of.
 

Members online


Top