15
submitted 1 year ago by tubbadu@lemmy.kde.social to c/linux@lemmy.ml

Hello! I just set up timeshift on my EndeavourOS pc, but this time I chose BTRFS instead of rsync. I currently decided to store the snapshot on the same hard drive of my installation because, well, it's my only one. during the setup, it only asked me if I wanted to include the @home or not. using rsync, instead, it asked for a bunch of locations, and I could choose to include only dotfile, everything, nothing,... is this normal?
also, the snapshot took like... 1 second? with rsync it may take up to 5 minutes... is this normal? or am I backupping fried air?

you are viewing a single comment's thread
view the rest of the comments
[-] eight_byte@feddit.de 12 points 1 year ago

Creating a snapshot is not the backup itself. It is basically freezing the current state of your files from this point on and then remembering what has chanced compared to the snapshot. So yes, it is normal that this takes no time since nothing is copied on your hard drive. If you want to backup the snapshot you need to make an actual backup of it. This is possible with btrfs. But since I haven’t done it yet, I can’t tell you the exact command.

[-] tubbadu@lemmy.kde.social 2 points 1 year ago

so it is a completely different process than with rsync... I always thought of the two ways are pretty similar

[-] tychosmoose@lemm.ee 2 points 1 year ago

Copy on write is the difference. As I understand it, a btrfs snapshot takes no space when it's created (beyond the file system record). The filesystem is always writing changes to file chunks as a new copy of the chunk, which is then recorded as a replacement of the old chunk (which is still present on-disk). So a snapshot tracks all of these later changes, and the file system keeps the old file chunks preserved as long as you keep the snapshot. That's why you can mount a btrfs snapshot. It just shows you the volume through the lens of all of these saved changes.

When you delete a snapshot you are then marking these preserved chunks as free space. So that is also quick.

[-] tubbadu@lemmy.kde.social 2 points 1 year ago

Whoever invented this is a genius, a genius...
thanks for the help!

load more comments (2 replies)
this post was submitted on 20 Jul 2023
15 points (94.1% liked)

Linux

48236 readers
640 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS