You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Res Pons <po...@hotmail.com> on 2006/08/01 16:26:48 UTC

Backing up SVN

Hi Everyone

I'm not clear and have no clue how to add svn to our nightly tape back up.  
We simply added to the back up.  But how does this work against a live 
server which is being used all day by developers and from 12-3 a.m. for 
automated builds.  Is there a python or preferably Perl script that gentley 
downs the server before back up exec kicks in?

I need to know more ore less the exact steps please.  Thanks

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

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

Re: Backing up SVN

Posted by Res Pons <po...@hotmail.com>.
OK, which makes sense.  i used sudo and it worked, thanks.

----Original Message Follows----
From: Andy Peters <de...@latke.net>
To: Subversion Users <us...@subversion.tigris.org>
Subject: Re: Backing up SVN
Date: Tue, 01 Aug 2006 12:07:06 -0700

Res Pons wrote:
>Ok just executing the command as follows caused the following error. Does 
>this mean I have to run it as sudo?
>
>svnadmin hotcopy /local0/svn /local0/backup/svn --clean-logs
>svnadmin: Can't open file '/local0/svn/locks/db-logs.lock': Permission 
>denied

It has to run as the owner of the repo.

-a

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

_________________________________________________________________
Don�t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/

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

Re: Backing up SVN

Posted by Andy Peters <de...@latke.net>.
Res Pons wrote:
> Ok just executing the command as follows caused the following error. 
> Does this mean I have to run it as sudo?
> 
> svnadmin hotcopy /local0/svn /local0/backup/svn --clean-logs
> svnadmin: Can't open file '/local0/svn/locks/db-logs.lock': Permission 
> denied

It has to run as the owner of the repo.

-a

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

Re: Backing up SVN

Posted by Res Pons <po...@hotmail.com>.
Great and thank you for all your help.  I ran it with sudo and it worked. 
And it took about 5 minutes for a 2.5 GB Repo.

----Original Message Follows----
From: Jay Jones <ja...@blueacorn.co.uk>
To: Res Pons <po...@hotmail.com>
CC: users@subversion.tigris.org
Subject: Re: Backing up SVN
Date: Tue, 01 Aug 2006 19:27:11 +0100

Res Pons wrote:
>Ok just executing the command as follows caused the following error. Does 
>this mean I have to run it as sudo?
>
>svnadmin hotcopy /local0/svn /local0/backup/svn --clean-logs
>svnadmin: Can't open file '/local0/svn/locks/db-logs.lock': Permission 
>denied
Sorry, i'm from a windoze background :(
1) Check you / your cron job has sufficient priviledges in that path  -drxw 
etc.
2) Try removing the --clean-logs switch
3) Anyone else? Google?

_________________________________________________________________
On the road to retirement? Check out MSN Life Events for advice on how to 
get there! http://lifeevents.msn.com/category.aspx?cid=Retirement

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

Re: Backing up SVN

Posted by Jay Jones <ja...@blueacorn.co.uk>.
Res Pons wrote:
> Ok just executing the command as follows caused the following error. 
> Does this mean I have to run it as sudo?
>
> svnadmin hotcopy /local0/svn /local0/backup/svn --clean-logs
> svnadmin: Can't open file '/local0/svn/locks/db-logs.lock': Permission 
> denied
Sorry, i'm from a windoze background :(
1) Check you / your cron job has sufficient priviledges in that path  
-drxw etc.
2) Try removing the --clean-logs switch
3) Anyone else? Google?

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

Re: Backing up SVN

Posted by Res Pons <po...@hotmail.com>.
Ok just executing the command as follows caused the following error. Does 
this mean I have to run it as sudo?

svnadmin hotcopy /local0/svn /local0/backup/svn --clean-logs
svnadmin: Can't open file '/local0/svn/locks/db-logs.lock': Permission 
denied

----Original Message Follows----
From: Jay Jones <ja...@blueacorn.co.uk>
To: Res Pons <po...@hotmail.com>
CC: users@subversion.tigris.org
Subject: Re: Backing up SVN
Date: Tue, 01 Aug 2006 18:14:50 +0100

Res Pons wrote:
>I'm not clear and have no clue how to add svn to our nightly tape back up.  
>We simply added to the back up.  But how does this work against a live 
>server which is being used all day by developers and from 12-3 a.m. for 
>automated builds.  Is there a python or preferably Perl script that gentley 
>downs the server before back up exec kicks in?
>
>I need to know more ore less the exact steps please.  Thanks
>
Any reason why you're not using the SubVersion "Hot Copy" admin command:
svnadmin hotcopy c:\repos\aproject z:\backup\aproject --clean-logs

This can be used to hot-copy the database, without taking it off-line.
This could be used:
1) To hot-copy directly onto your backup media (eg. virtual tape store),
      - Preferable as less-steps is less to go wrong!
2)  Or, Use as the "mirror" that your nightly tape backup archives.
      - Ensure that the the hot-copy runs well before the scheduled 
tape-backup
      - If the hot-copy fails - you'll just be backing up old files!

Regards,
Jay.

_________________________________________________________________
Don�t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/

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

Re: Backing up SVN

Posted by Jay Jones <ja...@blueacorn.co.uk>.
Res Pons wrote:
> Thank you for your help.  I didn't even know this utility existed.  If 
> I understand you correctly, I could run a cronjob to run the hotcopy 
> cmnd at a certain hour to a certain folder or another drive and then 
> back up that folder or drive?  
Yes.
> Our repository is on a linux red hat enterprise 3.5 with Apache.  
> Could I just run the hotcopy cmnd against the repo, copy it to a 
> folder and back up that folder?  How long does the hotcopy usually 
> take for a repo of about 2-5GB, do you happen to know?  Thanks again
>
> < snip >
Yes - but don't know why you'd do the extra "copy" step.  how long? - 
try and we shall see!

Here's the online reference page for SVN admin hotcopy command.
http://svnbook.red-bean.com/en/1.2/svn.ref.svnadmin.c.hotcopy.html
This utility should be available on your linux svn installation also. 
The command would look something more like this on linux:
svnadmin hotcopy $repo1 /tmp/mirror1

For configuring cron:
http://www.aota.net/Script_Installation_Tips/cronhelp.php3

Also, according to the website below: "The standard Subversion 
installation also provides a Python script within the tools/backup 
directory that can be scripted to run automatically (via cron for 
example), rather than running 'svnadmin hotcopy' manually."
http://linuxformat.co.uk/wiki/index.php/Subversion_-_Setting_up

Enjoy :)

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

Re: Backing up SVN

Posted by Res Pons <po...@hotmail.com>.
Thank you for your help.  I didn't even know this utility existed.  If I 
understand you correctly, I could run a cronjob to run the hotcopy cmnd at a 
certain hour to a certain folder or another drive and then back up that 
folder or drive?  Our repository is on a linux red hat enterprise 3.5 with 
Apache.  Could I just run the hotcopy cmnd against the repo, copy it to a 
folder and back up that folder?  How long does the hotcopy usually take for 
a repo of about 2-5GB, do you happen to know?  Thanks again

----Original Message Follows----
From: Jay Jones <ja...@blueacorn.co.uk>
To: Res Pons <po...@hotmail.com>
CC: users@subversion.tigris.org
Subject: Re: Backing up SVN
Date: Tue, 01 Aug 2006 18:14:50 +0100

Res Pons wrote:
>I'm not clear and have no clue how to add svn to our nightly tape back up.  
>We simply added to the back up.  But how does this work against a live 
>server which is being used all day by developers and from 12-3 a.m. for 
>automated builds.  Is there a python or preferably Perl script that gentley 
>downs the server before back up exec kicks in?
>
>I need to know more ore less the exact steps please.  Thanks
>
Any reason why you're not using the SubVersion "Hot Copy" admin command:
svnadmin hotcopy c:\repos\aproject z:\backup\aproject --clean-logs

This can be used to hot-copy the database, without taking it off-line.
This could be used:
1) To hot-copy directly onto your backup media (eg. virtual tape store),
      - Preferable as less-steps is less to go wrong!
2)  Or, Use as the "mirror" that your nightly tape backup archives.
      - Ensure that the the hot-copy runs well before the scheduled 
tape-backup
      - If the hot-copy fails - you'll just be backing up old files!

Regards,
Jay.

_________________________________________________________________
On the road to retirement? Check out MSN Life Events for advice on how to 
get there! http://lifeevents.msn.com/category.aspx?cid=Retirement

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

Re: Backing up SVN

Posted by Jay Jones <ja...@blueacorn.co.uk>.
Res Pons wrote:
> I'm not clear and have no clue how to add svn to our nightly tape back 
> up.  We simply added to the back up.  But how does this work against a 
> live server which is being used all day by developers and from 12-3 
> a.m. for automated builds.  Is there a python or preferably Perl 
> script that gentley downs the server before back up exec kicks in?
>
> I need to know more ore less the exact steps please.  Thanks
>
Any reason why you're not using the SubVersion "Hot Copy" admin command:
svnadmin hotcopy c:\repos\aproject z:\backup\aproject --clean-logs

This can be used to hot-copy the database, without taking it off-line.
This could be used:
1) To hot-copy directly onto your backup media (eg. virtual tape store),
      - Preferable as less-steps is less to go wrong!
2)  Or, Use as the "mirror" that your nightly tape backup archives.
      - Ensure that the the hot-copy runs well before the scheduled 
tape-backup
      - If the hot-copy fails - you'll just be backing up old files!

Regards,
Jay.

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