29
submitted 4 months ago* (last edited 4 months ago) by gpstarman@lemmy.today to c/linux@lemmy.ml

Can I delete previous backups, without affecting following backups, Since TimeShift (RSync) make increamental backups.

i'm picasso.

you are viewing a single comment's thread
view the rest of the comments
[-] LodeMike@lemmy.today 4 points 4 months ago

Its all just hard links I see no reason why you can't.

[-] gpstarman@lemmy.today 1 points 4 months ago

Because I still Don't know the difference between hardlinks and softlinks and symlinks 😅

[-] LodeMike@lemmy.today 2 points 4 months ago* (last edited 4 months ago)

Files on a hard drive aren't directly files. Folders, for example, are just metadata things which contain pointers to things like the previous directory and files within it (along with names) AND other metadata like owner, group, and permissions. Files have a similar metadata thing (they're called inodes) which things like owner, permissions, and a block manifest (where the data is stored) and critically: a count of how many things point to it.

This count is needed because of hard links. A hard link is two folders pointing to one of these file metadata blocks as different files. The count is used to ensure that a file that is still in use isn't deleted. This also means a hardlinked file must share at least some permissions. Most systems are also set up to only cache one copy of the file in RAM if such a situation were to come up.

So what I assume time shift does (can't use it because it has an aneurism when it sees a RAID drive for some fucking reason) is store independent "copies" of files per each backup, where only changed files are stored and the rest are hard linked. There is still storage used for the new folders but its on the scale of hundreds of KiloBytes. The software can purge one of the backups safely without affecting another, including the first backup.

A soft link is just a file that contains a file path. Like a shortcut.

[-] gpstarman@lemmy.today 2 points 4 months ago

Thank You. Still got to learn a lot.

[-] LodeMike@lemmy.today 2 points 4 months ago

If you look at the output of ls -l , you'll see a number on the left which tells you how the pointer counter. Folders are usually rather high, as both the parent folder, and any child folders point to it.

For files it counts the number of hardlinks.

this post was submitted on 01 Jul 2024
29 points (93.9% liked)

Linux

48058 readers
860 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