Noobie question about timeshift

A few days ago I’ve decided to go with GNU/Linux, manjaro in particular, as my only installed OS and been loving it since.
I, though, have not quite got how timeshift backups are supposed to work. When using btrfs you can only save it in the same drive the OS is installed on. If I try to save the backups in another drive it says that the drive must have a root subvolume. So if my main drive gets corrupted how am I supposed to use the snapshots that are stored on the exact same drive? Or are they meant to only provide a restore to a previous state in every situation but a catastrophic system corruption? Rsync on the other hand gives you the choice of saving them on another drive but it takes way longer, but I think it is worth it.
Bare with my ignorance, maybe I have got it all wrong here.

Ive only ever used timeshift with rsync to my secondary hard drive myself as i see it as the safer option. I believe the benefit of using btrfs witn timeshift is you can access/restore your backups from grub

1 Like

If you mean that the disk (hardware) is damaged, but snapshots can not help to recover your data in the same disk.
Snapshot is not backup. Backup should always be in external hard drive.

Yes, snapshot can help, if data/software is corrupted e.g. KDE Desktop goes wrong.

1 Like

Hello @ioannis :wink:

Ok if you come from Windows, then you you know “Windows System Recovery”. That is exactly what is TimeShift to designed for:

  1. It creates snapshots of your system files.
  2. If something breaks, then you can revert it to the last state.
  3. It is not intended to protect you from hardware failures or file system corruptions.

TimeShift is not mainly a tool to backup your personal data, but you can include them.

So snapshots should be stored on the same drive and with btrfs snapshot features, it is fast and reliable.

May advice: Use a different backup tool to backup your personal data.

2 Likes

Hi @megavolt and @ioannis

Allow me to join this topic.
I am on KDE and I mainly use Baloo as I have lots of documents to search within.
I just configured Timeshift. and manually took 2 snapshots.
Rebooting, no snapshots showing in Grub.

How to get Grup updated automatically?

  1. Edit sudo systemctl edit --full grub-btrfs.path
[Unit]
Description=Monitors for new timeshift snapshots
DefaultDependencies=no
Requires=run-timeshift-backup.mount
After=run-timeshift-backup.mount
BindsTo=run-timeshift-backup.mount

[Path]
PathModified=/run/timeshift/backup/timeshift-btrfs/snapshots

[Install]
WantedBy=run-timeshift-backup.mount
  1. Run sudo systemctl enable --now grub-btrfs.path

After new snapshot , then you should wait for more than 2 minutes, Grub will be automatically updated

If you need the ability of Baloo filter, it is available in Baloo configuration document.

  1. Edit ~/.config/baloofilerc to add:
folders[$e]=$HOME/Documents, $HOME/<...>, $HOME/<...>

Baloo will index all files in your corresponding directories.

Thanks @Zesko
I have the file with same contents in your post.
I do not understand where did it get the BTRFS as I do not have any BTRFS.

Though I am considering creating a BTRFS partition, reinstall to BTRFS and keep my data on EXT4 (Baloo has a bug that keeps reindexing /home if it is BTRFS.)

Should I run it though I am on EXT4?

I already have it and running fine. Thanks @Zesko

Wait. I did not know that you do not use BTRFS.

First check what is output of lsblk -f?


I am confused, you are using BTRFS when taking 2 snapshots?

Here it is

lsblk -f                                                                           ✔  12m 25s  
NAME   FSTYPE FSVER LABEL    UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda                                                                              
├─sda1 vfat   FAT32 NO_LABEL 03B2-4056                             299.1M     0% /boot/efi
└─sda2 ext4   1.0   home     37b5884e-6ea9-41ad-90fb-1b1a1064334c  190.5G    11% /run/timeshift/backup
                                                                                 /
sdb                                                                              
sr0          

and

inxi -Fxxx                                                                                     ✔ 
System:
  Host: limo Kernel: 5.15.41-1-MANJARO arch: x86_64 bits: 64 compiler: gcc
    v: 12.1.0 Desktop: KDE Plasma v: 5.24.5 tk: Qt v: 5.15.4 wm: kwin_x11 vt: 1
    dm: SDDM Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 20157 v: Lenovo G580
    serial: <superuser required> Chassis: type: 10 v: Lenovo G580
    serial: <superuser required>
  Mobo: LENOVO model: Lenovo G580 serial: <superuser required> UEFI: LENOVO
    v: 62CN97WW date: 07/12/2013
Battery:
  ID-1: BAT0 charge: 25.5 Wh (100.0%) condition: 25.5/42.8 Wh (59.7%)
    volts: 12.2 min: 10.8 model: SMP LNV-L11M6Y01 type: Li-ion serial: 6365
    status: N/A
CPU:
  Info: dual core model: Intel Core i5-3210M bits: 64 type: MT MCP
    smt: enabled arch: Ivy Bridge rev: 9 cache: L1: 128 KiB L2: 512 KiB
    L3: 3 MiB
  Speed (MHz): avg: 1471 high: 1885 min/max: 1200/3100 cores: 1: 1885
    2: 1197 3: 1608 4: 1197 bogomips: 19962
  Flags: avx ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3
Graphics:
  Device-1: Intel 3rd Gen Core processor Graphics vendor: Lenovo driver: i915
    v: kernel arch: Gen7 ports: active: LVDS-1 empty: DP-1,HDMI-A-1,VGA-1
    bus-ID: 00:02.0 chip-ID: 8086:0166 class-ID: 0300
  Device-2: Acer Lenovo Integrated Webcam type: USB driver: uvcvideo
    bus-ID: 1-1.5:5 chip-ID: 5986:0294 class-ID: 0e02
  Display: x11 server: X.Org v: 21.1.3 with: Xwayland v: 22.1.1
    compositor: kwin_x11 driver: X: loaded: modesetting alternate: fbdev,vesa
    gpu: i915 display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1366x768 s-dpi: 96 s-size: 361x203mm (14.21x7.99")
    s-diag: 414mm (16.31")
  Monitor-1: LVDS-1 model: Chi Mei Opto 0x15a7 res: 1366x768 hz: 60
    dpi: 101 size: 344x193mm (13.54x7.6") diag: 398mm (15.7") modes: 1366x768
  OpenGL: renderer: Mesa Intel HD Graphics 4000 (IVB GT2)
    v: 4.2 Mesa 22.0.4 compat-v: 3.1 direct render: Yes
Audio:
  Device-1: Intel 7 Series/C216 Family High Definition Audio vendor: Lenovo
    driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:1e20
    class-ID: 0403
  Sound Server-1: ALSA v: k5.15.41-1-MANJARO running: yes
  Sound Server-2: JACK v: 1.9.21 running: no
  Sound Server-3: PulseAudio v: 15.0 running: yes
  Sound Server-4: PipeWire v: 0.3.51 running: no
Network:
  Device-1: Broadcom BCM4313 802.11bgn Wireless Network Adapter driver: wl
    v: kernel pcie: speed: 2.5 GT/s lanes: 1 bus-ID: 02:00.0 chip-ID: 14e4:4727
    class-ID: 0280
  IF: wlp2s0 state: up mac: 08:ed:b9:97:27:0f
  Device-2: Qualcomm Atheros AR8162 Fast Ethernet vendor: Lenovo
    driver: alx v: kernel pcie: speed: 2.5 GT/s lanes: 1 port: 2000
    bus-ID: 03:00.0 chip-ID: 1969:1090 class-ID: 0200
  IF: enp3s0 state: down mac: f0:de:f1:fd:53:97
Bluetooth:
  Device-1: Foxconn / Hon Hai Broadcom BCM20702 Bluetooth type: USB
    driver: btusb v: 0.8 bus-ID: 1-1.4:4 chip-ID: 0489:e032 class-ID: fe01
    serial: 08EDB9972710
  Report: rfkill ID: hci0 rfk-id: 2 state: up address: see --recommends
Drives:
  Local Storage: total: 232.89 GiB used: 26.01 GiB (11.2%)
  ID-1: /dev/sda vendor: Samsung model: SSD 870 EVO 250GB size: 232.89 GiB
    speed: 6.0 Gb/s type: SSD serial: S5Y4NJ0R325556E rev: 1B6Q scheme: GPT
Partition:
  ID-1: / size: 227.88 GiB used: 25.7 GiB (11.3%) fs: ext4 dev: /dev/sda2
  ID-2: /boot/efi size: 299.4 MiB used: 288 KiB (0.1%) fs: vfat
    dev: /dev/sda1
Swap:
  Alert: No swap data was found.
Sensors:
  System Temperatures: cpu: 51.0 C mobo: 44.0 C
  Fan Speeds (RPM): N/A
Info:
  Processes: 196 Uptime: 26m wakeups: 1 Memory: 7.61 GiB
  used: 1.84 GiB (24.2%) Init: systemd v: 250 default: graphical Compilers:
  gcc: 12.1.0 clang: 13.0.1 Packages: pacman: 1081 Shell: Zsh v: 5.9
  default: Bash v: 5.1.16 running-in: konsole inxi: 3.3.17

Ah, you do not have BTRFS filesystem, you can not create snapshot without BTRFS.

No, you should not.

It was me who manually took the 2 snapshots.

I see, so I SHOULD have BTRFS to work as I am expecting?
OK. I hope you can give me a link how to make a fresh install with system on BTRFS while data on EXT4.

BTRFS is CoW filesystem and has the ability to create snapshots. EXT4 cannot.

Thanks a lot @Zesko
You already saved me a lot of time.
As I have seen some other posts I see you are experienced with BTRFS.
I do not mind doing a fresh install BUT with my /home and data on EXT4 not BTRFS to avoid the Baloo problem with BTRFS.

Can I do it? How?

baloo has the known bug with BTRFS or ZFS.

There are two possible suggestions:

  1. Suggestion:

I would recommend using kfind instead of baloo
KFind was already integrated in Dolphin that can find file name or content of file what you want to search.

OR

  1. Suggestion:

if you need baloo and BTRFS snapshots, then you can have two separated partitions on your disk:

  • A partition with EXT4 for the /home directory.
  • A partition with BTRFS for the / directory.

You just pinpointed it exactly what I want to do.
Can I do it during installation? 2 different partitions?
I booted live USB but it gave me option for BTRFS for both system and /home! (mostly my bad! Sorry)

Yes, you can manually edit partition administration in Calamares.