You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Fouts Christopher (QNA RTP PT PREV)" <Ch...@qimonda.com> on 2008/05/19 20:01:45 UTC

Full & incrmental dumps

I read the manual but still have a fundamental question.

Essentially I want to create a full dump on a Monday night, but
only incremental dumps Tue-Fri nights.

I run a cron job to say fully-backup my repos on a Monday night
with
        > svnadmin dump //repos > dumpfile-full.date

Now if I want to do incremental backups for Tues-Fri, will I
then just run a cron job (Tue-Fri) that will do this?
        > svnadmin dump -incremental //repos > dumpfile-incr.date

--------------------------------------
Chris T Fouts

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: Full & incrmental dumps

Posted by Ryan Schmidt <su...@ryandesign.com>.
On May 26, 2008, at 11:47, Fouts Christopher (QNA RTP PT PREV) wrote:

>>>>> Makes sense. So in my post-commit hook script, how can I name the
>>>>> incremental dump files automtically, since I obviously will
>>>>> have lots of these, per commit as you suggest.
>>>>
>>>>
>>>> Put basename of the repository path and the revision number in the
>>>> name.
>>>
>>> Ok I'm trying to implement this idea.
>>>
>>> I have the following in my post-commit hook script
>>>
>>> REPOS="$1"
>>> REV="$2"
>>> #Incremental dump after each commit
>>> INCRDUMP=/usr/local/bin/svnadmin dump --revision PREV:$REV
>>> --incremental DUMPFILE=/some_path/mycode-incr.$REV
>>> $INCRDUMP $REPOS > $DUMPFILE
>>>
>>> I see the $DUMPFILE createad, but has a size of "0" meaing I did the
>>> dump wrong!!! What would be the correct command to dump the
>>> changes for the current commit
>>>
>>> INCRDUMP=/usr/local/bin/svnadmin dump --deltas --incremental
>>>
>>> perhaps???
>>
>> Sorry this is what I have...
>>
>> REPOS="$1"
>> REV="$2"
>> #Incremental dump after each commit
>> INCRDUMP=/usr/local/bin/svnadmin dump
>> DUMPFILE=/some_path/mycode-incr.$REV
>> $INCRDUMP $REPOS --revision $REV --incremental > $DUMPFILE
>>
>> and I still get a dump file size of 0.
>
> Ok I fixed it. I had to do this...
>
> REPOS="$1"
> REV="$2"
> #Incremental dump after each commit
> SVNADMIN=/usr/local/bin/svnadmin
> DUMPFILE=/some_path/mycode-incr.$REV
> $SVNADMIN dump $REPOS --revision $REV --incremental > $DUMPFILE
>
> Apparently the scripts did not parse (design-intent) the
> space before the "dump" in my original definition of
> INCRDUMP=/usr/local/bin/svnadmin dump

Correct. Consult your favorite Bash scripting manual. :)



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

RE: Full & incrmental dumps

Posted by "Fouts Christopher (QNA RTP PT PREV)" <Ch...@qimonda.com>.

>-----Original Message-----
>From: Fouts Christopher (QNA RTP PT PREV)
>[mailto:Chris.Fouts@qimonda.com]
>Sent: Monday, May 26, 2008 12:32 PM
>To: users@subversion.tigris.org
>Subject: RE: Full & incrmental dumps
>
> >-----Original Message-----
>>From: Fouts Christopher (QNA RTP PT PREV)
>>Sent: Monday, May 26, 2008 12:14 PM
>>To: users@subversion.tigris.org
>>Subject: RE: Full & incrmental dumps
>>
>>
>>>-----Original Message-----
>>>From: Blair Zajac [mailto:blair@orcaware.com]
>>>Sent: Monday, May 19, 2008 4:54 PM
>>>To: Fouts Christopher (QNA RTP PT PREV)
>>>Cc: users@subversion.tigris.org
>>>Subject: Re: Full & incrmental dumps
>>>
>>>Fouts Christopher (QNA RTP PT PREV) wrote:
>>>>
>>>>> -----Original Message-----
>>>>> From: Blair Zajac [mailto:blair@orcaware.com]
>>>>> Sent: Monday, May 19, 2008 4:18 PM
>>>>> To: Fouts Christopher (QNA RTP PT PREV)
>>>>> Cc: users@subversion.tigris.org
>>>>> Subject: Re: Full & incrmental dumps
>>>>>
>>>>> Fouts Christopher (QNA RTP PT PREV) wrote:
>>>>>> I read the manual but still have a fundamental question.
>>>>>>
>>>>>> Essentially I want to create a full dump on a Monday
>>>night, but only
>>>>>> incremental dumps Tue-Fri nights.
>>>>>>
>>>>>> I run a cron job to say fully-backup my repos on a Monday
>>>night with
>>>>>>         > svnadmin dump //repos > dumpfile-full.date
>>>>>>
>>>>>> Now if I want to do incremental backups for Tues-Fri, will I
>>>>> then just
>>>>>> run a cron job (Tue-Fri) that will do this?
>>>>>>         > svnadmin dump -incremental //repos > dumpfile-incr.date
>>>>> It would be better to do incremental backups after each
>>>commit and a
>>>>> full backup on Monday nights.  Then have a cron that removes
>>>>> incrementals that are older than say, two weeks.  The incremental
>>>>> command in this case will just backup the commit that happened.
>>>>>
>>>>> Regards,
>>>>> Blair
>>>>>
>>>>
>>>> Makes sense. So in my post-commit hook script, how can I name the
>>>> incremental dump files automtically, since I obviously will
>>>have lots
>>>> of these, per commit as you suggest.
>>>
>>>Put basename of the repository path and the revision number in the
>>>name.
>>>
>>>Blair
>>>
>>
>>Ok I'm trying to implement this idea.
>>
>>I have the following in my post-commit hook script
>>
>>REPOS="$1"
>>REV="$2"
>>#Incremental dump after each commit
>>INCRDUMP=/usr/local/bin/svnadmin dump --revision PREV:$REV
>>--incremental DUMPFILE=/some_path/mycode-incr.$REV
>>$INCRDUMP $REPOS > $DUMPFILE
>>
>>I see the $DUMPFILE createad, but has a size of "0" meaing I did the
>>dump wrong!!! What would be the correct command to dump the
>changes for
>>the current commit
>>
>>INCRDUMP=/usr/local/bin/svnadmin dump --deltas --incremental
>>
>>perhaps???
>>
>
>Sorry this is what I have...
>
>REPOS="$1"
>REV="$2"
>#Incremental dump after each commit
>INCRDUMP=/usr/local/bin/svnadmin dump
>DUMPFILE=/some_path/mycode-incr.$REV
>$INCRDUMP $REPOS --revision $REV --incremental > $DUMPFILE
>
>and I still get a dump file size of 0.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
>For additional commands, e-mail: users-help@subversion.tigris.org
>

Ok I fixed it. I had to do this...

REPOS="$1"
REV="$2"
#Incremental dump after each commit
SVNADMIN=/usr/local/bin/svnadmin
DUMPFILE=/some_path/mycode-incr.$REV
$SVNADMIN dump $REPOS --revision $REV --incremental > $DUMPFILE

Apparently the scripts did not parse (design-intent) the
space before the "dump" in my original definition of
INCRDUMP=/usr/local/bin/svnadmin dump

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


RE: Full & incrmental dumps

Posted by "Fouts Christopher (QNA RTP PT PREV)" <Ch...@qimonda.com>.
 >-----Original Message-----
>From: Fouts Christopher (QNA RTP PT PREV)
>Sent: Monday, May 26, 2008 12:14 PM
>To: users@subversion.tigris.org
>Subject: RE: Full & incrmental dumps
>
>
>>-----Original Message-----
>>From: Blair Zajac [mailto:blair@orcaware.com]
>>Sent: Monday, May 19, 2008 4:54 PM
>>To: Fouts Christopher (QNA RTP PT PREV)
>>Cc: users@subversion.tigris.org
>>Subject: Re: Full & incrmental dumps
>>
>>Fouts Christopher (QNA RTP PT PREV) wrote:
>>>
>>>> -----Original Message-----
>>>> From: Blair Zajac [mailto:blair@orcaware.com]
>>>> Sent: Monday, May 19, 2008 4:18 PM
>>>> To: Fouts Christopher (QNA RTP PT PREV)
>>>> Cc: users@subversion.tigris.org
>>>> Subject: Re: Full & incrmental dumps
>>>>
>>>> Fouts Christopher (QNA RTP PT PREV) wrote:
>>>>> I read the manual but still have a fundamental question.
>>>>>
>>>>> Essentially I want to create a full dump on a Monday
>>night, but only
>>>>> incremental dumps Tue-Fri nights.
>>>>>
>>>>> I run a cron job to say fully-backup my repos on a Monday
>>night with
>>>>>         > svnadmin dump //repos > dumpfile-full.date
>>>>>
>>>>> Now if I want to do incremental backups for Tues-Fri, will I
>>>> then just
>>>>> run a cron job (Tue-Fri) that will do this?
>>>>>         > svnadmin dump -incremental //repos > dumpfile-incr.date
>>>> It would be better to do incremental backups after each
>>commit and a
>>>> full backup on Monday nights.  Then have a cron that removes
>>>> incrementals that are older than say, two weeks.  The incremental
>>>> command in this case will just backup the commit that happened.
>>>>
>>>> Regards,
>>>> Blair
>>>>
>>>
>>> Makes sense. So in my post-commit hook script, how can I name the
>>> incremental dump files automtically, since I obviously will
>>have lots
>>> of these, per commit as you suggest.
>>
>>Put basename of the repository path and the revision number in the
>>name.
>>
>>Blair
>>
>
>Ok I'm trying to implement this idea.
>
>I have the following in my post-commit hook script
>
>REPOS="$1"
>REV="$2"
>#Incremental dump after each commit
>INCRDUMP=/usr/local/bin/svnadmin dump --revision PREV:$REV
>--incremental DUMPFILE=/some_path/mycode-incr.$REV
>$INCRDUMP $REPOS > $DUMPFILE
>
>I see the $DUMPFILE createad, but has a size of "0" meaing I
>did the dump wrong!!! What would be the correct command to
>dump the changes for the current commit
>
>INCRDUMP=/usr/local/bin/svnadmin dump --deltas --incremental
>
>perhaps???
>

Sorry this is what I have...

REPOS="$1"
REV="$2"
#Incremental dump after each commit
INCRDUMP=/usr/local/bin/svnadmin dump
DUMPFILE=/some_path/mycode-incr.$REV
$INCRDUMP $REPOS --revision $REV --incremental > $DUMPFILE

and I still get a dump file size of 0.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


RE: Full & incrmental dumps

Posted by "Fouts Christopher (QNA RTP PT PREV)" <Ch...@qimonda.com>.
>-----Original Message-----
>From: Blair Zajac [mailto:blair@orcaware.com]
>Sent: Monday, May 19, 2008 4:54 PM
>To: Fouts Christopher (QNA RTP PT PREV)
>Cc: users@subversion.tigris.org
>Subject: Re: Full & incrmental dumps
>
>Fouts Christopher (QNA RTP PT PREV) wrote:
>>
>>> -----Original Message-----
>>> From: Blair Zajac [mailto:blair@orcaware.com]
>>> Sent: Monday, May 19, 2008 4:18 PM
>>> To: Fouts Christopher (QNA RTP PT PREV)
>>> Cc: users@subversion.tigris.org
>>> Subject: Re: Full & incrmental dumps
>>>
>>> Fouts Christopher (QNA RTP PT PREV) wrote:
>>>> I read the manual but still have a fundamental question.
>>>>
>>>> Essentially I want to create a full dump on a Monday
>night, but only
>>>> incremental dumps Tue-Fri nights.
>>>>
>>>> I run a cron job to say fully-backup my repos on a Monday
>night with
>>>>         > svnadmin dump //repos > dumpfile-full.date
>>>>
>>>> Now if I want to do incremental backups for Tues-Fri, will I
>>> then just
>>>> run a cron job (Tue-Fri) that will do this?
>>>>         > svnadmin dump -incremental //repos > dumpfile-incr.date
>>> It would be better to do incremental backups after each
>commit and a
>>> full backup on Monday nights.  Then have a cron that removes
>>> incrementals that are older than say, two weeks.  The incremental
>>> command in this case will just backup the commit that happened.
>>>
>>> Regards,
>>> Blair
>>>
>>
>> Makes sense. So in my post-commit hook script, how can I name the
>> incremental dump files automtically, since I obviously will
>have lots
>> of these, per commit as you suggest.
>
>Put basename of the repository path and the revision number in
>the name.
>
>Blair
>

Ok I'm trying to implement this idea.

I have the following in my post-commit hook script

REPOS="$1"
REV="$2"
#Incremental dump after each commit
INCRDUMP=/usr/local/bin/svnadmin dump --revision PREV:$REV --incremental
DUMPFILE=/some_path/mycode-incr.$REV
$INCRDUMP $REPOS > $DUMPFILE

I see the $DUMPFILE createad, but has a size of "0" meaing I did the
dump wrong!!! What would be the correct command to dump the changes
for the current commit

INCRDUMP=/usr/local/bin/svnadmin dump --deltas --incremental

perhaps???

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: Full & incrmental dumps

Posted by Blair Zajac <bl...@orcaware.com>.
Fouts Christopher (QNA RTP PT PREV) wrote:
> 
>> -----Original Message-----
>> From: Blair Zajac [mailto:blair@orcaware.com]
>> Sent: Monday, May 19, 2008 4:18 PM
>> To: Fouts Christopher (QNA RTP PT PREV)
>> Cc: users@subversion.tigris.org
>> Subject: Re: Full & incrmental dumps
>>
>> Fouts Christopher (QNA RTP PT PREV) wrote:
>>> I read the manual but still have a fundamental question.
>>>
>>> Essentially I want to create a full dump on a Monday night, but only
>>> incremental dumps Tue-Fri nights.
>>>
>>> I run a cron job to say fully-backup my repos on a Monday night with
>>>         > svnadmin dump //repos > dumpfile-full.date
>>>
>>> Now if I want to do incremental backups for Tues-Fri, will I
>> then just
>>> run a cron job (Tue-Fri) that will do this?
>>>         > svnadmin dump -incremental //repos > dumpfile-incr.date
>> It would be better to do incremental backups after each commit
>> and a full backup on Monday nights.  Then have a cron that
>> removes incrementals that are older than say, two weeks.  The
>> incremental command in this case will just backup the commit
>> that happened.
>>
>> Regards,
>> Blair
>>
> 
> Makes sense. So in my post-commit hook script, how can I name the
> incremental dump files automtically, since I obviously will have
> lots of these, per commit as you suggest.

Put basename of the repository path and the revision number in the name.

Blair


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Full & incrmental dumps

Posted by marc gonzalez-carnicer <ca...@gmail.com>.
my post commit script updates a file that saves the committed revision
number to a file. then every night an incremental dump is performed.
but perhaps for this kind of thing it may be better to use svnsync.

what makes me confused is the availability of 3 backup systems :
svnsync, svnadmin dump and svnadmin hotcopy. i wonder if there is a
preferred scenario for each of these.





2008/5/19 Fouts Christopher (QNA RTP PT PREV) <Ch...@qimonda.com>:
>
>
>>-----Original Message-----
>>From: Blair Zajac [mailto:blair@orcaware.com]
>>Sent: Monday, May 19, 2008 4:18 PM
>>To: Fouts Christopher (QNA RTP PT PREV)
>>Cc: users@subversion.tigris.org
>>Subject: Re: Full & incrmental dumps
>>
>>Fouts Christopher (QNA RTP PT PREV) wrote:
>>> I read the manual but still have a fundamental question.
>>>
>>> Essentially I want to create a full dump on a Monday night, but only
>>> incremental dumps Tue-Fri nights.
>>>
>>> I run a cron job to say fully-backup my repos on a Monday night with
>>>         > svnadmin dump //repos > dumpfile-full.date
>>>
>>> Now if I want to do incremental backups for Tues-Fri, will I
>>then just
>>> run a cron job (Tue-Fri) that will do this?
>>>         > svnadmin dump -incremental //repos > dumpfile-incr.date
>>
>>It would be better to do incremental backups after each commit
>>and a full backup on Monday nights.  Then have a cron that
>>removes incrementals that are older than say, two weeks.  The
>>incremental command in this case will just backup the commit
>>that happened.
>>
>>Regards,
>>Blair
>>
>
> Makes sense. So in my post-commit hook script, how can I name the
> incremental dump files automtically, since I obviously will have
> lots of these, per commit as you suggest.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

RE: Full & incrmental dumps

Posted by "Fouts Christopher (QNA RTP PT PREV)" <Ch...@qimonda.com>.

>-----Original Message-----
>From: Blair Zajac [mailto:blair@orcaware.com]
>Sent: Monday, May 19, 2008 4:18 PM
>To: Fouts Christopher (QNA RTP PT PREV)
>Cc: users@subversion.tigris.org
>Subject: Re: Full & incrmental dumps
>
>Fouts Christopher (QNA RTP PT PREV) wrote:
>> I read the manual but still have a fundamental question.
>>
>> Essentially I want to create a full dump on a Monday night, but only
>> incremental dumps Tue-Fri nights.
>>
>> I run a cron job to say fully-backup my repos on a Monday night with
>>         > svnadmin dump //repos > dumpfile-full.date
>>
>> Now if I want to do incremental backups for Tues-Fri, will I
>then just
>> run a cron job (Tue-Fri) that will do this?
>>         > svnadmin dump -incremental //repos > dumpfile-incr.date
>
>It would be better to do incremental backups after each commit
>and a full backup on Monday nights.  Then have a cron that
>removes incrementals that are older than say, two weeks.  The
>incremental command in this case will just backup the commit
>that happened.
>
>Regards,
>Blair
>

Makes sense. So in my post-commit hook script, how can I name the
incremental dump files automtically, since I obviously will have
lots of these, per commit as you suggest.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: Full & incrmental dumps

Posted by Blair Zajac <bl...@orcaware.com>.
Fouts Christopher (QNA RTP PT PREV) wrote:
> I read the manual but still have a fundamental question.
> 
> Essentially I want to create a full dump on a Monday night, but
> only incremental dumps Tue-Fri nights.
> 
> I run a cron job to say fully-backup my repos on a Monday night
> with
>         > svnadmin dump //repos > dumpfile-full.date
> 
> Now if I want to do incremental backups for Tues-Fri, will I
> then just run a cron job (Tue-Fri) that will do this?
>         > svnadmin dump -incremental //repos > dumpfile-incr.date

It would be better to do incremental backups after each commit and a full backup 
on Monday nights.  Then have a cron that removes incrementals that are older 
than say, two weeks.  The incremental command in this case will just backup the 
commit that happened.

Regards,
Blair


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org