Hello,

On Sun, Jun 30, 2024 at 06:40:03AM -0700, pe...@easthope.ca wrote:
> I'm beginning to learn Git.  So I wonder about another approach where 
> files are in a local Git repository.  That would allow  tracing the 
> history of any file.  A backup of the extant repository would still be 
> necessary.  
> 
> I don't know the software well enough to compare the two approaches.

Git has some properties that are desirable for general backup
purposes, but also some fairly huge downsides. For example:

- It's not efficient or performant for storing large binary files.
  As a result, several extensions and external programs around git
  exist for getting large binary files into git. Trying to use git
  for general purpose backups will run up against this unless you
  never want to back up large binary files.

- Git stores full (compressed) copies of every version of every
  file. Most backup solutions do better on space.

- Git has no built in way to purge old content. It keeps it all. A
  typical requirement for backup software is to have a bounded limit
  on the oldest versions that will be kept, and quite often there
  are more complex requirements such as "keep daily copies for a
  month, week;y copies for 6 months, monthly copies for 6 years"
  etc. Very hard to do with git.

My first thought when I read the post that started this thread was,

    "What is this person doing? If the goal is to have a real world
    project to learn some programming techniques and have fun, fair
    enough, but if the goal here is to have a decent backup scheme
    why are they not using any of the existing excellent solutions
    that have thought of and solved so many of the problems in this
    space?"

That did not seem like it would be a welcome response at the time so
I held my tongue, but if you are now thinking of looking in to using
git for the purpose, I think it's a wrong step, and in saying so I
might as well say the other as well.

Just use borgbackup, restic, amanda or even rsnapshot (ancient but
still functional).

Unless you are wanting to have a first hand learning experience
about why you should just use borgbackup, restic, amanda or even
rsnapshot.

(Also I think learning about git is best done by using it for what
it was designed for: managing source code in git.)

Thanks,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting

Reply via email to