From: Steven Grimm <koreth@midwinter.com>
To: git@vger.kernel.org
Subject: Using git as a general backup mechanism (was Re: Using GIT to store /etc)
Date: Tue, 12 Dec 2006 14:49:10 -0800 [thread overview]
Message-ID: <457F31E6.8090701@midwinter.com> (raw)
In-Reply-To: <200612121553.37499.andyparkins@gmail.com>
This discussion reminds me of a use of git I've had in the back of my
head to try out for a while. Right now I'm doing my local snapshot
backups using the rsync-with-hard-links scheme
(http://www.mikerubel.org/computers/rsync_snapshots/ if you're not
familiar with it). This is nice in that the contents of files that don't
change are only stored once on the backup disk. But it is less than
optimal in that a file that changes even a little bit is stored from
scratch.
What would be great for this would be to store each day's backup as a
git revision; with a periodic repack, this would be much more
space-efficient than the rsync hard links.
The problem is that while that would give me a very efficient backup
scheme, the repository would still grow over time. In rsync land, I
solve the disk space issue by keeping two weeks' worth of daily
snapshots, then six months' worth of weekly snapshots, then two years'
worth of monthly snapshots; files that change daily have a constant
number of revisions stored in my backups, and older files drop off the
backup disk as they age.
Given that there's no way (or is there?) to delete revisions from the
*beginning* of a git revision history, right now it seems like the only
approach that comes close is to give up on the "daily then weekly then
monthly" thing -- probably fine given the space savings of delta
compression -- and periodically make shallow clones of the backup
repository that fetch all but the first N revisions; once a shallow
clone is made, the original gets deleted and the clone is the new backup
repo.
But it would sure be more efficient to be able to "shallow-ize" an
existing repository. That would be useful for things other than backups,
too, e.g. the recent request for some way to track just the current
version of the kernel code rather than its revision history. If there
were a shallowize command, you could do something like "git pull; git
shallowize --depth 1" to track the latest revision without keeping the
history locally.
Anyone think that sounds like an interesting thing to explore?
-Steve
next prev parent reply other threads:[~2006-12-12 22:49 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-10 13:40 Using GIT to store /etc (Or: How to make GIT store all file permission bits) Kyle Moffett
2006-12-10 14:49 ` Jeff Garzik
2006-12-10 15:30 ` Jakub Narebski
2006-12-10 18:10 ` Kyle Moffett
2006-12-10 18:18 ` Jakub Narebski
2006-12-10 18:26 ` Jakub Narebski
2006-12-10 18:35 ` Kyle Moffett
2006-12-11 10:39 ` Andreas Ericsson
2006-12-11 10:55 ` Jeff Garzik
2006-12-11 12:13 ` Josef Weidendorfer
2006-12-11 13:33 ` Johannes Schindelin
2006-12-11 15:07 ` Josef Weidendorfer
2006-12-10 15:06 ` Santi Béjar
2006-12-10 17:46 ` Kyle Moffett
2006-12-10 18:10 ` Jakub Narebski
2007-01-10 1:39 ` David Lang
2007-01-10 2:30 ` Shawn O. Pearce
2007-01-10 18:34 ` David Lang
2007-01-12 0:55 ` Shawn O. Pearce
2006-12-11 10:50 ` Nikolai Weibull
2006-12-12 3:45 ` Daniel Barkalow
2006-12-12 13:49 ` Kyle Moffett
2006-12-12 15:53 ` Andy Parkins
2006-12-12 22:49 ` Steven Grimm [this message]
2006-12-12 22:57 ` Using git as a general backup mechanism (was Re: Using GIT to store /etc) Johannes Schindelin
2006-12-12 23:06 ` Steven Grimm
2006-12-13 0:01 ` Johannes Schindelin
2006-12-12 23:15 ` Martin Langhoff
2006-12-12 23:23 ` Martin Langhoff
2006-12-12 23:43 ` Using git as a general backup mechanism Junio C Hamano
2006-12-14 23:33 ` Steven Grimm
2006-12-15 0:33 ` Junio C Hamano
2006-12-13 18:10 ` Using GIT to store /etc (Or: How to make GIT store all file permission bits) Daniel Barkalow
2006-12-14 5:06 ` Chris Riddoch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=457F31E6.8090701@midwinter.com \
--to=koreth@midwinter.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).