Backup Strategy Questions

I believe so. From TimeShift → Browse (button) I could see many folders with names date and time

[root@lenovo snapshots]# ls
2022-08-02_17-10-24  2022-08-08_17-00-01  2022-08-09_09-11-09  2022-08-09_11-08-22  2022-08-09_13-46-06
2022-08-02_18-33-39  2022-08-09_07-00-02  2022-08-09_09-21-10  2022-08-09_11-19-09  2022-08-09_14-39-50
2022-08-04_16-45-49  2022-08-09_08-00-01  2022-08-09_09-22-10  2022-08-09_12-39-29
2022-08-05_16-41-25  2022-08-09_09-00-01  2022-08-09_10-38-36  2022-08-09_12-51-48
2022-08-06_17-00-02  2022-08-09_09-02-13  2022-08-09_10-53-03  2022-08-09_13-28-08
[root@lenovo snapshots]# 

Each folder has:

[root@lenovo 2022-08-09_14-39-50]# ls
@  @home  info.json
[root@lenovo 2022-08-09_14-39-50]# 

Then opening the @home folder gives the snapshot… of all files and folders!
I checked with a few text files… edited one of them a few times, renamed, duplicated… (with a snapshot in between), and I could select whatever earlier snapshot from the file.
Please correct me if I am wrong.

My point is, that only works if there is something left to browse. When you restore you may have removed the data you wanted to copy back.

You cannot undo a restore.

1 Like

Honestly I did not restore @home (yet). But even tough, the snapshots are still there.
I may be mistaken as I am new to all this… just 9 days.

This “--exclude” options seems a little too much from my point of view.

"/dev/*","/proc/*","/sys/*","/run/*","/mnt/*"

are all different filesystems. They can be excluded with a simple -x or --one-file-system. /media is eventually another separate filesystem too. So that this rsync command could look like:

rsync -aAXHv -x --exclude={"/lost+found"} ...

EDIT:
And I would also add -h to preserve hard links. => -aAhHxX are the options I use by default

But I can restore to another snapshot. Right?
The only thing I have now, sometimes after booting I get a TimeShift error window, saying somethin like you need administrator or root privilege… but rebooting again… instantly… it does not appear!

What might this be? Any way to fix?

For me… so far so good… and I am having most of my files (mostly PDF Books on cloud… so I just re-download them)

The case in question was “back up the entire system”. In this case, you don’t want to use --one-file-system

Uhh…what? When you restore what you lose is that data created since the last snapshot. Usually, no other snapshot would contain that data.

OK… so, according to my simple understanding:

  • I should always not check the box to restore @home
  • Whenever I need old data I simply browse the snapshots and copy/paste it to wherever I want.

I do not understand this. There are several snapshot folders with earlier date and time already having the data!

Yes, but you can restore only to a single snapshot. You can think of snapshots like git diffs and git commits. When you are restoring to a snapshot, you are reverting to a certain commit.

Side Note:
I always found timeshift confusing, I was able to use it but never could understand it enough to tweak it. @dalto 's Btrfs assistant was a godsend. You will learn more about btrfs using the assistant. If possible (since you are interested in learning) try to use Btrfs assistant.

1 Like

OK, lets say you take 5 snapshots, one each day. July 1st, July 2nd, July 3rd, July 4th and July 5th.

On July 7th you decide to restore your most recent snapshot with timeshift.

Any data you created between July 5th and July 7th is now forever gone. None of the older snapshots will contain this data.

1 Like

Why not? You are doing an rsync for ‘/’ and you exclude all kernel filesystems with -x. That is /dev /proc /run /sys and eventually /tmp and any other filesystem that is mounted to ‘/’ like /media . No need to specifically exclude them with --exclude={/dev,...}.

This of course assumes that you want to do a backup per filesystem and not all filesystems in one shot incl. /home and everything else. May be that is the misunderstanding here. I translated “entire system” to “just ‘/’” :wink:

Because the goal in that particular case wasn’t to back up /. It was to backup “The entire system”.

You also don’t know what the layout of the system in question is. Some people mount /usr on a separate filesystem for example.

yes, I was still editing my previous post. I get it now.

1 Like

I understand now! Whatever comes after the LAST snapshot will be gone because it was not snapshot.
In my case… as TimeShift takes a snapshot every hour automatically, so all what I can lose is the last hour that is not snapshot.
I hope I got it right.

Yes that is right

Thanks a lot @sradjoker , you gave me more self confidence I am somewhat understanding BTRFS and snapshots.

I was the same as you a few months ago, I wanted Btrfs support for ARM installs. So I had to do a lot of research on my own and got help from dalto to accomplish it. I had to do lot of experimentation too. Tinkering and experimenting along with reading documentation is the best way to learn in my opinion.

I will certainly do it especially @dalto called for testers Btrfs Assistant 1.0 is coming, testers needed, but as of tomorrow or after tomorrow (to give myself some time to read/ask). This is the least I can do to return something to him.