Re: git as a backup tool?
- From
- Russell <russellsteicke@gmail.com>
- Date
- May 15, 2007, 05:09 UTC
- Message-ID
- <c1b8b6670705142209x267e44cbrea26aa8818275aea@mail.gmail.com>
- In-Reply-To
- <Pine.LNX.4.64.0705141334120.20215@anakin>
On 5/14/07, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
Show 7 quoted lines
> Hi, > > Has anyone considered using git as a backup tool? I.e. > - put your whole file system in git > - do `git add .; git commit -a' from cron > - copy .git to external media once in a while > - clean up old stuff (unused and older than xx days) from .git
I'm using git to backup my private email, all in Maildir format, in that manner. In addition, I push to a remote bare repository automatically, using ssh host keys.
The most annoying issue was trying to prevent spam getting stuck in the mail history. I do this by having the "unsure" mail folder in a different place, and then having a symlink from the mail store point there so mutt can still find it easily if needed.
Backing up a whole home directory would require careful thought about what _not_ to backup, similar to the spam issue. You probably wouldn't want to backup things that you download off the net and can easily retrieve again, like foo-1.2.tar.gz etc.
I'm not sure what you mean by cleaning up old stuff. git (or at least my usage of it) requires the whole history to be in the repository. I haven't looked at shallow clones or other ways to prune history.
-- Virus found in this message.