otalado
Posts: 37
Joined: Tue Oct 27, 2015 4:17 pm

How to install Timeshift

Tue May 23, 2023 6:36 am

I tried to install Timeshift. According to https://linuxhint.com/install-timeshift-raspberry-pi/ (a few months old) that should be a piece of cake. Unfortunately, not so. I ended up with the dreaded E: unable to locate package timeshift message when tried to install it. I searched and found that te Timeshift package for ARM64 architecture exists in Debian Bullseye (11) repository. So I added this repo to the apt ..../souces.list.d/raspi.list file. This time I was hit with another dreaded message : E: The repository ..... does not have a Release file.

On this forum, I found nothing about the Timeshift utility except that it is one of the recommended backup utilities: So what I am asking is: Is there anybody who successfully installed (and used) the Timeshift on the Raspberry Pi OS (Bullseye) recently?
I'd kindly ask him/her to share with me (us) how he/she did it.

User avatar
neilgl
Posts: 6091
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near The National Museum of Computing

Re: How to install Timeshift

Tue May 23, 2023 10:31 pm

On a pi4 running Bullseye 32-bit with Desktop

Code: Select all

sudo apt install timeshift
Note it is timeshift not Timeshift

otalado
Posts: 37
Joined: Tue Oct 27, 2015 4:17 pm

Re: How to install Timeshift

Wed May 24, 2023 4:48 am

Thanks for the reply. Yes, I used a capital T when asking the question. But I did not quote the command I used to try to install the application. So I used the correct command (same as you suggest) with the result I described.
Now the question is - did you just correct the error that you thought I made or you tried the install and it really works for you? If it is the latter, it is possible that my apt sources are wrong/incomplete and I like to request that you tell me what you have in your sources?

otalado
Posts: 37
Joined: Tue Oct 27, 2015 4:17 pm

Re: How to install Timeshift

Wed May 24, 2023 5:06 am

After extensive Googling, I found the package timeshift_20.11.1-1_arm64.deb. So I downloaded it and tried to install it. This ended up with a message about unresolved dependencies (btrfs-progs|btrfs-utils). So I researched further. On timeshift Github issues I found issue #913. It essentially says that the timeshift support is no more and that the fork of it is maintained and developed by Linux Mint.
Well, that ends it. From my experience, Linux Mint does not support ARM64 (nor armhf), and found no indication that it will in the foreseeable future.
Pity!

BTW: I don't know if the btrfs was always a timeshift requirement, but when you install it on current Linux Mint (21.1) id asks you if you want to install it on ext4 or on btrfs. Perhaps that's that's result of Mint continued developments. Who knows ...

redvli
Posts: 933
Joined: Thu Sep 03, 2020 8:09 am

Re: How to install Timeshift

Wed May 24, 2023 5:41 am

You can simply run:

Code: Select all

sudo apt install btrfs-progs
then you have at least support for btrfs filesystem and snapshots.
To use a tool like Timeshift to the full extent, your root filesystem needs to be btrfs, not ext4. The pre-installed downloadable RPiOS images use ext4, so one needs to convert it to btrfs. That includes quite some steps, but there are several guides, for example: viewtopic.php?p=714438

There are many tools that use btrfs features, most are command-line based. I use btrfs mostly directly from command-line to make clones and snapshots and backups, although I have a tool called snapper installed doing the background snapshotting on all Linux installations I have.

There is also a tool called btrbk, I have written my own similar more tailored for my own devices scripts. But it looks great https://github.com/teejee2008/timeshift

Nice that Linux Mint has forked it, a GUI makes it easier to handle. I see they base the naming of snapshots as done in Debian (or Ubuntu, they made same choice). But it can be whatever names, it is just that you need some convention to distinguish subvolumes and directories easily (and versions). The tool snapper uses /.snapshots/<number>/snapshot and an additional info.xml file for dates, but most people want a timestamp in the subvolume name, then it is easy to see what version it is. But it all can be renamed if you want, e.g. if you switch from 1 tool to the other.
Last edited by redvli on Wed May 24, 2023 6:03 am, edited 1 time in total.

swampdog
Posts: 1036
Joined: Fri Dec 04, 2015 11:22 am

Re: How to install Timeshift

Wed May 24, 2023 6:03 am

Granted, not fully up to date buster but 'sudo apt-get install timehift' was all I recall having to perform..

Code: Select all

foo@pi18:~ $ dpkg -l | grep timeshift
ii  timeshift                              19.01+ds-2+deb10u1                      armhf        System restore utility

foo@pi20:~ $ dpkg -l | grep timeshift
ii  timeshift                              19.01+ds-2+deb10u1                      arm64        System restore utility
eg:

Code: Select all

foo@pi18:~ $ sudo apt-cache show timeshift
Package: timeshift
Version: 19.01+ds-2+deb10u1
Architecture: armhf
Maintainer: Yanhao Mo <yanhaocs@gmail.com>
Installed-Size: 2802
Depends: libatk1.0-0 (>= 1.12.4), libc6 (>= 2.4), libcairo-gobject2 (>= 1.10.0), libcairo2 (>= 1.2.4), libgdk-pixbuf2.0-0 (>= 2.22.0), libgee-0.8-2 (>= 0.8.3), libglib2.0-0 (>= 2.37.3), libgnutls30 (>= 3.6.5), libgtk-3-0 (>= 3.16.2), libjson-glib-1.0-0 (>= 0.13.2), libpango-1.0-0 (>= 1.14.0), libpangocairo-1.0-0 (>= 1.14.0), libpcre2-8-0 (>= 10.32), libvte-2.91-0, libx11-6, zlib1g (>= 1:1.1.4), rsync, psmisc
Replaces: timeshift-btrfs
Homepage: https://teejeetech.in/timeshift/
Priority: optional
Section: utils
Filename: pool/main/t/timeshift/timeshift_19.01+ds-2+deb10u1_armhf.deb
Size: 550320
SHA256: cab8acd0e24e46abf945198ebb4f3ddeabe05551e8ffafa909fb537e2eb534a4
SHA1: 3fff617c637ce0922f2db44cd5fc67a77b44e6a6
MD5sum: 6c9a5ec7c90db1720e4c4d8710835005
Description: System restore utility
 Timeshift is a system restore utility which takes snapshots
 of the system at regular intervals. These snapshots can be restored
 at a later date to undo system changes. Creates incremental snapshots
 using rsync or BTRFS snapshots using BTRFS tools.
Description-md5: 111bc23f71315a6e4f214d083796ab9c
Note: although it works well once configured, it crashes trying to restore from the command line (same under mint) so don't bother unless you have a gui installed because a gui is only way to reliably control it. That said, if you do end up with an unbootable system, simply rewrite an rpi image, install timeshift then when you fire it up under the gui, point it at the old timeshift path then restore & reboot. Ignore grub stuff obviously.

One of the above rpi has an ssd with a separate partition for timeshift. The other rpi has the timeshift partition on a usb stick (probably better). 'sudo timeshift --list' will show its status. I've only used the "rsync" method. Note also, I install the gui even on headless boxes - ditto my debian servers but it doesn't need to be running if you also install 'nomachine' because that will offer a virtual desktop if a real one isn't running.

Someone else will have to confirm if the package has now been removed or not. I don't have a spare rpi to test a new image.

redvli
Posts: 933
Joined: Thu Sep 03, 2020 8:09 am

Re: How to install Timeshift

Wed May 24, 2023 6:09 am

swampdog wrote:
Wed May 24, 2023 6:03 am
Someone else will have to confirm if the package has now been removed or not. I don't have a spare rpi to test a new image.
It is in RasPiOS/Raspbian/Debian Bullseye and Debian Bookworm; for the latter:

Code: Select all

# apt-cache show timeshift
Package: timeshift
Version: 22.11.2-1
Installed-Size: 3155
Maintainer: Yanhao Mo <yanhaocs@gmail.com>
Architecture: amd64
Replaces: timeshift-btrfs
Depends: cron-daemon | cron, psmisc, rsync, libc6 (>= 2.34), libcairo2 (>= 1.2.4), libgdk-pixbuf-2.0-0 (>= 2.22.0), libgee-0.8-2 (>= 0.8.3), libglib2.0-0 (>= 2.39.4), libgtk-3-0 (>= 3.16.2), libjson-glib-1.0-0 (>= 1.5.2), libvte-2.91-0, libxapp1 (>= 1.0.4)
Breaks: util-linux (<< 2.37.2~)
Description-en: System restore utility
 Timeshift is a system restore utility which takes snapshots
 of the system at regular intervals. These snapshots can be restored
 at a later date to undo system changes. Creates incremental snapshots
 using rsync or BTRFS snapshots using BTRFS tools.
Description-md5: 111bc23f71315a6e4f214d083796ab9c
Homepage: https://github.com/linuxmint/timeshift
Tag: uitoolkit::gtk
Section: utils
Priority: optional
Filename: pool/main/t/timeshift/timeshift_22.11.2-1_amd64.deb
Size: 616508
MD5sum: 6588fb5bde17946150d662eb36fb3a56
SHA256: 698bd08dc815c39d3ea72dd6bc8f0c89470963dd6f63ce3d2b1e0e9c188cb4d6

redvli
Posts: 933
Joined: Thu Sep 03, 2020 8:09 am

Re: How to install Timeshift

Wed May 24, 2023 6:24 am

Some note on converting to btrfs root filesystem: A better reference is /viewtopic.php?f=29&t=104108
Although also old and some things not valid anymore like swap issue, btrfs and initramfs are simply part of Raspberry Pi OS. It is just that RPL does not have it in their pre-installed downloadable images. Those do not use initrd/initramfs, so you need to do that yourself. It also means having a method in-place done by yourself to update /boot/config.txt after kernel upgrade as Raspberry Pi OS is broken at that point.

User avatar
rpdom
Posts: 21820
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: How to install Timeshift

Wed May 24, 2023 6:47 am

otalado wrote:
Wed May 24, 2023 5:06 am
After extensive Googling, I found the package timeshift_20.11.1-1_arm64.deb. So I downloaded it and tried to install it. This ended up with a message about unresolved dependencies (btrfs-progs|btrfs-utils). So I researched further.
Installing directly from a deb file with dpkg won't automatically pull in the required dependencies. The easiest way to resolve them is to run "sudo apt -f install" (-f is short for --fix-missing) afterwards.
Unreadable squiggle

User avatar
neilgl
Posts: 6091
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near The National Museum of Computing

Re: How to install Timeshift

Wed May 24, 2023 10:24 am

did you just correct the error that you thought I made
No , installed it to get Timeshift v20.11.1 by Tony George (teejeetech@gmail.com). sources.list contains

Code: Select all

deb http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi

otalado
Posts: 37
Joined: Tue Oct 27, 2015 4:17 pm

Re: How to install Timeshift

Thu May 25, 2023 7:00 am

Hi, nellgl
I modified sources.lst on my PI to be the same as yours. However, when I ran the apt update, I got error:
The repository 'http://raspbian.raspberrypi.org/raspbian bullseye InRelease' is not signed.

I now that I read somewhere that it is possible to force apt to update from such repository but I am afraid that to do it is not really a good idea??

User avatar
rpdom
Posts: 21820
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: How to install Timeshift

Thu May 25, 2023 7:14 am

otalado wrote:
Thu May 25, 2023 7:00 am
I now that I read somewhere that it is possible to force apt to update from such repository but I am afraid that to do it is not really a good idea??
It is not usually a good idea, because it shouldn't happen if the repositories are set up correctly.

What OS are you running - 32 or 64 bit? Raspberry Pi OS, or other?

You can use "dpkg --print-architecture" to check the bitsize. "armhf" is 32 bit. arm64 is 64-bit.

"head /etc/os_release" will help identify the OS.
Unreadable squiggle

otalado
Posts: 37
Joined: Tue Oct 27, 2015 4:17 pm

Re: How to install Timeshift

Thu May 25, 2023 7:19 am

As I mentioned in my question I was looking for ARM64, and I run Rasbery Pi Os (bullseye)

redvli
Posts: 933
Joined: Thu Sep 03, 2020 8:09 am

Re: How to install Timeshift

Thu May 25, 2023 7:52 am

otalado wrote:
Thu May 25, 2023 7:19 am
As I mentioned in my question I was looking for ARM64, and I run Rasbery Pi Os (bullseye)
You should be able to install timeshift with just the default repositories as are configured in Raspberry Pi OS.

Apparently this topic is not so much about timeshift, but how to fix your probably broken apt system configuration. So maybe list your /etc/apt/sources* and contents.

Why do you want an alternative version of timeshift?

And you might be looking for ARM64, but it doesn't mean that you run RasPiOS64. I hope you know what has changed recently for Pi4, if that is what you use.
This forum has multiple similar cases. People start looking on the internet for some tool and get stuck, often because it messes up their local default version available in RasPiOS and/or dependencies.

User avatar
rpdom
Posts: 21820
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: How to install Timeshift

Thu May 25, 2023 8:03 am

otalado wrote:
Thu May 25, 2023 7:19 am
As I mentioned in my question I was looking for ARM64, and I run Rasbery Pi Os (bullseye)
It was not clear if you were just referring to the hardware, kernel or the OS.

Ok, in that case you wouldn't have the Raspbian repositories keys installed, as they are for 32-bit. You can run 32-bit code on the 64-bit OS using multiarch, but it is preferable to run 64-bit if possible.

Timeshift should be available in the default 64-bit Debian repos and install without issue using apt.

What do you get for the following commands?

Code: Select all

apt policy timeshift
apt policy
Unreadable squiggle

otalado
Posts: 37
Joined: Tue Oct 27, 2015 4:17 pm

Re: How to install Timeshift

Fri May 26, 2023 4:30 am

Hi,

to answer your question:

Code: Select all

pi@pi4-8:~ $ apt policy
Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 http://archive.raspberrypi.org/debian bullseye/main armhf Packages
     release o=Raspberry Pi Foundation,a=stable,n=bullseye,l=Raspberry Pi Foundation,c=main,b=armhf
     origin archive.raspberrypi.org
 500 http://archive.raspberrypi.org/debian bullseye/main arm64 Packages
     release o=Raspberry Pi Foundation,a=stable,n=bullseye,l=Raspberry Pi Foundation,c=main,b=arm64
     origin archive.raspberrypi.org
Pinned packages:
Since timeshift isn't installed, the other command just tells that it cannot find the timeshift package.

Btw, sorry for my somewhat irregular timing of questions/replies, but I am juggling my time between babysitting one year old grandson, cooking for whole family, sitting on computer and trying to have a life of my own :)

otalado
Posts: 37
Joined: Tue Oct 27, 2015 4:17 pm

Re: How to install Timeshift

Fri May 26, 2023 4:40 am

Sorry, in previous reply I forgot to mention that I don't really understand what you mean when you said:
Ok, in that case you wouldn't have the Raspbian repositories keys installed, as they are for 32-bit. You can run 32-bit code on the 64-bit OS using multiarch, but it is preferable to run 64-bit if possible.
I downloaded and installed Raspberry Pi OS (64-bit) from raspberrypi.com. I don't remember being prompted about multiarch (and things like that) during the install ?!

User avatar
rpdom
Posts: 21820
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: How to install Timeshift

Fri May 26, 2023 7:56 am

otalado wrote:
Fri May 26, 2023 4:30 am
Hi,

to answer your question:

Code: Select all

pi@pi4-8:~ $ apt policy
Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 http://archive.raspberrypi.org/debian bullseye/main armhf Packages
     release o=Raspberry Pi Foundation,a=stable,n=bullseye,l=Raspberry Pi Foundation,c=main,b=armhf
     origin archive.raspberrypi.org
 500 http://archive.raspberrypi.org/debian bullseye/main arm64 Packages
     release o=Raspberry Pi Foundation,a=stable,n=bullseye,l=Raspberry Pi Foundation,c=main,b=arm64
     origin archive.raspberrypi.org
Pinned packages:
Ok, that is very wrong. The main repository is missing. No wonder you can't install timeshift. I'm surprised you can install anything.

For a standard install /etc/apt/sources.list will look like this

Code: Select all

deb http://deb.debian.org/debian bullseye main contrib non-free
deb http://security.debian.org/debian-security bullseye-security main contrib non-free
deb http://deb.debian.org/debian bullseye-updates main contrib non-free
# Uncomment deb-src lines below then 'apt-get update' to enable 'apt-get source'
#deb-src http://deb.debian.org/debian bullseye main contrib non-free
#deb-src http://security.debian.org/debian-security bullseye-security main contrib non-free
#deb-src http://deb.debian.org/debian bullseye-updates main contrib non-free
and /etc/apt/sources.list.d/raspi.list will look like this

Code: Select all

deb http://archive.raspberrypi.org/debian/ bullseye main
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ bullseye main
There should be any other files in /etc/apt/sources.list.d

Make sure your sources.list files are correct, run apt update then try the install. You'll probably also find that an apt full-upgrade pulls in a load of stuff.
Btw, sorry for my somewhat irregular timing of questions/replies, but I am juggling my time between babysitting one year old grandson, cooking for whole family, sitting on computer and trying to have a life of my own :)
Don't worry about it. It's called life ;-)
Unreadable squiggle

otalado
Posts: 37
Joined: Tue Oct 27, 2015 4:17 pm

Re: How to install Timeshift

Mon May 29, 2023 5:41 pm

Hi,
after a few day I finally have a few moments. I checked contents of my apt list* files and (certainly) they were very different from yours. When I copied yours over mine, few things happened:
- there were over 130 upgradable packages. Something that worried me over past few weeks was that whenever I tried there were no updates/upgrades.
- when I tried to install the timeline it went without glitch.

As I have another RPI4 (with 4GB memory) which I have installed roughly at same time as the one (but I am using it for a very different purposes) and I've noticed the same kind of lack of update/upgrades in about same time, I checked the apt sources lists on it, and it turned out thy were wrong the same way as the one where I had the issues.

Since I was not playing with those files - and certainly not on both of RPI4s, I suspect that possible reason for this could be that roughly at end of March there was a big update involving firmware, kernel changes (and whatnot) and that something went wrong at that time. Unfortunately I cannot be sure about that, since in the past I have used RPI2s, RPI3s , Zeroes an I never experienced that
an update or upgrade failed (unless it was directly triggered by something stupid I've done :(

Anyway, thank you for your patient help.

Return to “Raspberry Pi OS”