Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Might be a dumb question. But I installed SVN 1.4.6 via apt-get. Everythings working dandy with no issues. I want to backup all the SVN files so I figured to backup /svn which is where appache is setup to look for.

Anyhow. I have a file called retroeventhandler.vbs. When I run

sudo find / -name retroeventhandler.vbs

I get nothing back. But I can browse the server at ip/svn/ and see all the files there.

Any ideas where these files should be? Am I missing something.

UPDATE based on squillman's post:

ls -l /svn/repos/avqbsync/db/revs returns

total 35252
-rw-r--r-- 1 www-data root         115 2009-09-01 14:42 0
-rw-r--r-- 1 www-data root     9445835 2009-09-01 14:42 1
-rw-r--r-- 1 www-data root        2490 2009-09-01 14:42 2
-rw-r--r-- 1 www-data root         800 2009-09-01 14:42 3
-rw-r--r-- 1 www-data www-data    4779 2009-09-08 14:06 4
-rw-r--r-- 1 www-data www-data 8914223 2009-09-08 14:45 5
-rw-r--r-- 1 www-data www-data 8816246 2009-09-08 16:28 6
-rw-r--r-- 1 www-data www-data     651 2009-09-08 16:30 7
-rw-r--r-- 1 www-data www-data     862 2009-09-08 16:31 8
-rw-r--r-- 1 www-data www-data 8818276 2009-09-08 16:35 9

My understanding is that each of these are revs or versions. So if I backup this directory I presume I would later be able to restore the files? Or no. Sorry if this is a noob question, just a bit confusing.

Another Update: Found this link which might give me a better solution:

share|improve this question
add comment

4 Answers

up vote 3 down vote accepted

Subversion stores repository information inside a database of flat files. If your repository lives in /svn, then that's where your committed files are. It doesn't actually store the repository data in the same filestructure as you create on the client-side. You won't actually see retroeventhandler.vbs at the filesystem level.

If you want to browse the repository use a subversion client (such as TortoiseSVN in Windows) or svnlook.

In response to your edit:
Have a look at this article, toward the bottom it talks about backing up a repo using svnadmin dump.

share|improve this answer
    
I can browse the repos fine, my main thing is to be able to back them up. please see my comment above. –  shaiss Sep 16 '09 at 20:54
2  
... and you should look into using svnadmin dump for your backup. –  retracile Sep 16 '09 at 20:54
    
thanks for that, I'll look into that. –  shaiss Sep 16 '09 at 20:56
add comment

I just finished a shell script that does monthly full backups and nightly incrementals, all to an offsite server. This is how it works:

The offsite server runs a nightly cron job. On the first Sunday of every month, this script runs ssh svnuser@myhost svnadmin dump /svnpath and pipes the output to a file. It then scans backwards from the end of the file and records the last revision number in a file.

On all other nights, the script runs, via ssh, 'svnlook youngest /svnpath' and compares the output to the last recorded (backed up) revision number. If there have been new commits, it runs svnadmin dump -q --deltas --incremental -r $LASTREV+1:HEAD /svnroot and dumps the output to a file.

Then it runs some cleanup code to delete full dumps older than $N days and any incremental dumps older than the newest full.

share|improve this answer
add comment

squillman is correct. You won't find the files just sitting there, they are contained within the database. Here is a great perl script that performs a backup, copies it to another machine, tests the integrity of the backup, and emails you with the results.

share|improve this answer
add comment

You should probably be using svnadmin dump to do your backups. I would strongly recommend reading through the svn book

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.