problem of backup
problems of backup
suppose you have a a big external drive for backup. This drive is connected to your machine via usb3. The question is, how you going to do backup.
one way, is that each weak, you creat a backup folder on the drive, and just copy entire home dir over. So you have something like this on the drive:
The problem with this is that, your dir has hundred thousands of small files. It takes a long time to copy over small files, 5 or more hours.
another way, is to zip the dir you want to backup, then just copy this one large file over.
It seems to me, this is faster. But, zip file is hard to access. you can't browse them on the backup drive easily, and you have to unzip it if you want to restore files. (you could cherry pick files in a zip archive, but that gets very complex.)
another way, is to use rsync to copy files over. This way, you avoid the problem of copying unchanged files every time. But, you only got 1 version of backup.
another way, is to use git, for at least some directories. For example, i have several git repo that's my website. They have hundred thousand small files, each often just 100k bytes. It's difficult to use git for backup, because for each git repo, you have to use a git command. And, what about directories that is not a git repo, such as
Do you make each a git repo?
or, do you make your entire home dir a git repo? if you make your entire home dir a git repo, you may have problems, because, some of the dir are already a git repo, so you got nested git repo.
If you have a question, put $5 at patreon and message me.