Git for backing up important files - why not?

Let's say I want to use Git to backup my PC.

I do not need a full system backup. I don't mind reinstalling things if my hard drive crashes. I just want to back up data files that are on the same partition.

To back up using Git, I could create a repo on this partiion, clone it (bare) to a separate disk or system and periodically commit and click to backup my files.

What, if any, are the disadvantages of using Git to backup in this way?

+6
source share
2 answers
Repository

Git takes up as much space as each version of your files is compressed. If you plan to archive pre-compressed data such as photos, be prepared for huge .git growth.

As of 2011, Git does not use binary differences, such as, for example, Subversion, and saves binary files as they are compressed.

If you do not have enough disk space, consider using other, more efficient in terms of disk space, specialized backup solutions. Borg , attic , restic , duplicity , zbackup come to mind.

+6
source

This is a pretty decent solution, and much better than nothing. Dead simple too if you are familiar with git.

One drawback is that the story will be preserved forever; There is no easy way to collapse old, obsolete versions of files or even reduce old versions. For example, you may need to cancel anything older than 3 years old, and something older than a year you only need monthly snapshots. Thus, your backup will grow continuously until it destroys your entire drive.

+1
source

Source: https://habr.com/ru/post/894687/


All Articles