[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Auto-cleaning of log files?

From: Tobias Ringstrom <tori_at_ringstrom.mine.nu>
Date: 2003-04-04 09:50:00 CEST

On Fri, 4 Apr 2003, Branko Cibej wrote:

> Michael Price wrote:
> > Tobias Ringstrom wrote:
> >
> >> I think that the ever growing amount of log files will be a surprise
> >> for a
> >> lot of subversion newbies. I know that it's described in the book, but I
> >> fear that a lot of new users will not study the book as closely as one
> >> might hope for. Built-in support for removing unused log files would
> >> probably help a lot. Just a thought...
> >
> >
> > There is built-in support. Put something like this in your post-commit
> > hook.
> >
> > #!/bin/sh
> >
> > db_archive -a -h /path/to/repo/db | xargs rm

The problem with the current approach is that you have to learn about
Berkley DB in order to use Subversion. I think that it would be great if
the user did not *have* to do that. Except for the log file issue the BDB
is invisible to the user. The log files are the only thing that sticks

Another reason why the command above can be problematics is that if I run
the stuff above it will break because the wrong db_archive (from db3) is
called. If subversion performed the removal, it would would use the BDB
API and have no problem.

> All right, this isn't exactly built-in support. But an upcoming version
> of Berkeley DB /will/ provide automatic log file cleanup. I don't know
> what the setup will look like, though.

Sounds promising.

> I'd like to point out one thing, though: removing your log files
> _without_ backing up your database first is a recipe for disaster. The
> log files are there so that you can roll backwards or forwards to a
> consistent state in case something goes wrong.

Right. I must admit that I do not really have a good idea how to solve
the log file issue, but I do fear that it will be one of those things that
will annoy new subversion users until they learn what the log files are
and how to remove them. We already see "my repo is huge" reports every
other week, and still the current user base is a fraction of what it will
be. I suspect that if there were an obvious/intuitive way to take care of
the log files it would probably already be implemented. It may well be
that the backup script that is included in the distribution is the best

As I mentioned earlier I use svnadmin dump to perform backups. I do that
because I imagine that the dump format is more likely to be readable one
year from now, and also becuase the result is actually smaller than a
backup of the whole db. Adding a switch to svnadmin dump such as
--compact or something might also help users get rid of the log files,
and completely get rid of the reason to have to understand BDB.

[I fear that my posts might be taken as negative critisism, but that is
not my intention. I'm trying to help, because I really really like
subversion. As someone else said on this list, please let me know if I'm
getting annoying. The fact that english is not my first language makes it
much more difficult to express the attitude I would like to express.]


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Apr 4 09:50:53 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.