You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Daniel Andersson <li...@daniel-gr-andersson.com> on 2011/02/02 21:14:00 UTC
Reduce size of repository for backup
Hi all,
I deleted a bunch of large files from our repository yesterday that was
not meant to be stored there. But these are still of course in the SVN
history.
I wish to do a backup each night and today I use svnadmin hotcopy for
that, and rsync that hotcopy to an off-site server. I chose hotcopy
since it will not cause any problems with anyone using the repository at
the same time.
Is it possible to delete specific large files from the history? Or do I
have to dump and then delete the history all together?
Or could I do some kind of incremental backup instead and only a full
hotcopy backup each Sunday?
What is the best practice?
I'm running Debian 6 Squeeze with Subversion 1.6.12dfsg-4
Thanks
/Daniel
Re: Reduce size of repository for backup
Posted by Les Mikesell <le...@gmail.com>.
On 2/5/11 6:23 AM, Daniel Andersson wrote:
>
>>> OK, how would I go about then to completely delete the whole
>>> versioning history?
>>>
>>
>> One way would be to make sure all your workspaces are commited, export
>> the head version, then start a new repository and import the directory
>> back to it. Then delete your workspaces and check out new ones from the
>> new repository. That's pretty drastic, though.
>
> OK thanks Les, think I will give this a try.
>
> Thing is, I would be able to reduce the total size down to 15 % or something
> similar without loosing any important code.
>
You could still keep the old repository or a backup around somewhere in case
someone ever does want to look at the old versions to see how you solved some
problem. If you have a web server with enough space for it you can use viewvc
to browse/diff/download parts without having to check out a workspace or keep
svnserve running.
--
Les Mikesell
lesmikesell@gmail.com
Re: Reduce size of repository for backup
Posted by Daniel Andersson <li...@daniel-gr-andersson.com>.
On 02/05/2011 05:13 AM, Les Mikesell wrote:
> On 2/4/11 9:39 PM, Daniel Andersson wrote:
>>
>> OK, how would I go about then to completely delete the whole
>> versioning history?
>>
>
> One way would be to make sure all your workspaces are commited, export
> the head version, then start a new repository and import the directory
> back to it. Then delete your workspaces and check out new ones from the
> new repository. That's pretty drastic, though.
>
> ---
> Les Mikesell
> lesmikesell@gmail.com
>
OK thanks Les, think I will give this a try.
Thing is, I would be able to reduce the total size down to 15 % or
something similar without loosing any important code.
/Daniel
Re: Reduce size of repository for backup
Posted by Les Mikesell <le...@gmail.com>.
On 2/4/11 9:39 PM, Daniel Andersson wrote:
> >
> OK, how would I go about then to completely delete the whole versioning history?
>
One way would be to make sure all your workspaces are commited, export the head
version, then start a new repository and import the directory back to it. Then
delete your workspaces and check out new ones from the new repository. That's
pretty drastic, though.
---
Les Mikesell
lesmikesell@gmail.com
Re: Reduce size of repository for backup
Posted by Daniel Andersson <li...@daniel-gr-andersson.com>.
On 02/02/2011 09:59 PM, Les Mikesell wrote:
> On 2/2/11 2:47 PM, Andy Levy wrote:
>> On Wed, Feb 2, 2011 at 15:14, Daniel Andersson
>> <li...@daniel-gr-andersson.com> wrote:
>>> Hi all,
>>>
>>> I deleted a bunch of large files from our repository yesterday that
>>> was not
>>> meant to be stored there. But these are still of course in the SVN
>>> history.
>>>
>>> I wish to do a backup each night and today I use svnadmin hotcopy for
>>> that,
>>> and rsync that hotcopy to an off-site server. I chose hotcopy since
>>> it will
>>> not cause any problems with anyone using the repository at the same
>>> time.
>>>
>>> Is it possible to delete specific large files from the history? Or do
>>> I have
>>> to dump and then delete the history all together?
>>
>> http://subversion.apache.org/faq.html#removal
>>
>>> Or could I do some kind of incremental backup instead and only a full
>>> hotcopy backup each Sunday?
>>
>> As long as your incremental backups result in a usable repository when
>> it's all restored, that can be done. svnadmin dump --incremental I
>> think is what you'll need, there's no "incremental" hotcopy that I'm
>> aware of.
>
> Or do a scheduled svnsync to a remote repository which will just pick up
> the updates after you get the initial copy. You might need to let it run
> over a weekend to get started, or make a copy locally and move it offsite.
>
OK, how would I go about then to completely delete the whole versioning
history?
/Daniel
Re: Reduce size of repository for backup
Posted by Les Mikesell <le...@gmail.com>.
On 2/2/11 2:47 PM, Andy Levy wrote:
> On Wed, Feb 2, 2011 at 15:14, Daniel Andersson
> <li...@daniel-gr-andersson.com> wrote:
>> Hi all,
>>
>> I deleted a bunch of large files from our repository yesterday that was not
>> meant to be stored there. But these are still of course in the SVN history.
>>
>> I wish to do a backup each night and today I use svnadmin hotcopy for that,
>> and rsync that hotcopy to an off-site server. I chose hotcopy since it will
>> not cause any problems with anyone using the repository at the same time.
>>
>> Is it possible to delete specific large files from the history? Or do I have
>> to dump and then delete the history all together?
>
> http://subversion.apache.org/faq.html#removal
>
>> Or could I do some kind of incremental backup instead and only a full
>> hotcopy backup each Sunday?
>
> As long as your incremental backups result in a usable repository when
> it's all restored, that can be done. svnadmin dump --incremental I
> think is what you'll need, there's no "incremental" hotcopy that I'm
> aware of.
Or do a scheduled svnsync to a remote repository which will just pick up the
updates after you get the initial copy. You might need to let it run over a
weekend to get started, or make a copy locally and move it offsite.
--
Les Mikesell
lesmikesell@gmail.com
Re: Reduce size of repository for backup
Posted by Andy Levy <an...@gmail.com>.
On Wed, Feb 2, 2011 at 15:14, Daniel Andersson
<li...@daniel-gr-andersson.com> wrote:
> Hi all,
>
> I deleted a bunch of large files from our repository yesterday that was not
> meant to be stored there. But these are still of course in the SVN history.
>
> I wish to do a backup each night and today I use svnadmin hotcopy for that,
> and rsync that hotcopy to an off-site server. I chose hotcopy since it will
> not cause any problems with anyone using the repository at the same time.
>
> Is it possible to delete specific large files from the history? Or do I have
> to dump and then delete the history all together?
http://subversion.apache.org/faq.html#removal
> Or could I do some kind of incremental backup instead and only a full
> hotcopy backup each Sunday?
As long as your incremental backups result in a usable repository when
it's all restored, that can be done. svnadmin dump --incremental I
think is what you'll need, there's no "incremental" hotcopy that I'm
aware of.