Example batch file to dump Subversion repositories
I have a large collection of repositories, and until now ran a single batch file that had to be updated each time I created a new repository, to add the new directory.
To combat that, I did some research and created a new batch file that does all the heavy lifting for me.
To save others time, I present it below.
SET timeVar=%date:~10,4%%date:~4,2%%date:~7,2%
SET repoDumpDir=..\repos_dump
FOR /D %%G IN (*) DO svnadmin dump %%G > %repoDumpDir%%%G%timeVar%.dump
PAUSE
The key items are the repoDumpDir variable, which you'll want to set accordingly. (Save and run this batch file in the directory you store your repositories.)
For each directory it finds, it assumes it's a repository and attempts to do an svnadmin dump, so we can restore if needed. It adds today's date (YYYYMMDD) to the end of the repository (directory) name.
Search
Links of Note
Support This Site
If my blog was helpful to you, then please consider visiting my Amazon Wishlist.