Recommended Posts

I'm wondering if I have all bases covered, so how do you backup your repos?

I have the following batch script running on a scheduled task, which creates a 7-zip file like this:

post-176093-0-11120500-1357446480.png

Looking for any input - thanks a lot! :)


@echo off
echo Backing up SVN... do NOT close!
echo.
echo.
for /f "tokens=1-4 delims=/ " %%a in ('date /t') do (set bdate=%%c-%%a-%%b)
for /f "tokens=1-2 delims=/:" %%a in ('time /t') do (set btime=%%a-%%b)
cd %temp%
rd /s /q svnbackup >nul 2>&1
md svnbackup
cd svnbackup
md certs
md conf
net stop VisualSVNServer >nul 2>&1
svnadmin dump --deltas --quiet S:/Customers > Customers.dump
svnadmin dump --deltas --quiet S:/Internal > Internal.dump
net start VisualSVNServer >nul 2>&1
for %%I in (S:\authz S:\authz-windows S:\htpasswd C:\INTERNAL\SVN\Backup.bat) do copy %%I . >nul
copy "%VISUALSVN_SERVER%\certs\*" certs >nul
copy "%VISUALSVN_SERVER%\conf\*" conf >nul
"%ProgramFiles%\7-Zip\7z.exe" a -mx9 %bdate%_%btime%.7z *
move *.7z C:\Users\DB\Dropbox\Backups\SVN >nul
cd ..
rd /s /q svnbackup >nul 2>&1
[/CODE]

  • Like 1
Link to comment
https://www.neowin.net/forum/topic/1129356-how-do-you-backup-svn/
Share on other sites

  On 06/01/2013 at 04:28, -Alex- said:
I'm wondering if I have all bases covered, so how do you backup your repos? I have the following batch script running on a scheduled task, which creates a 7-zip file like this: post-176093-0-11120500-1357446480.png Looking for any input - thanks a lot! :)
 @echo off echo Backing up SVN... do NOT close! echo. echo. for /f "tokens=1-4 delims=/ " %%a in ('date /t') do (set bdate=%%c-%%a-%%b) for /f "tokens=1-2 delims=/:" %%a in ('time /t') do (set btime=%%a-%%b) cd %temp% rd /s /q svnbackup >nul 2>&1 md svnbackup cd svnbackup md certs md conf net stop VisualSVNServer >nul 2>&1 svnadmin dump --deltas --quiet S:/Customers > Customers.dump svnadmin dump --deltas --quiet S:/Internal > Internal.dump net start VisualSVNServer >nul 2>&1 for %%I in (S:\authz S:\authz-windows S:\htpasswd C:\INTERNAL\SVN\Backup.bat) do copy %%I . >nul copy "%VISUALSVN_SERVER%\certs\*" certs >nul copy "%VISUALSVN_SERVER%\conf\*" conf >nul "%ProgramFiles%\7-Zip\7z.exe" a -mx9 %bdate%_%btime%.7z * move *.7z C:\Users\DB\Dropbox\Backups\SVN >nul cd .. rd /s /q svnbackup >nul 2>&1 [/CODE]

  On 07/01/2013 at 02:02, Kamil Kowalski said:
<snip>

Not exactly the answer I was looking for, but thanks for the effort, and welcome to Neowin! :)

  On 07/01/2013 at 02:15, DonC said:

I just use a scheduled svnsync to back mine up to another computer.

Thanks Don. The only off-site service I have to backup to though is Dropbox.

Just use svnsync to copy the files to your dropbox folder. Or have your script place your 7z files in the dropbox folder - and then dropbox will sync them to the cloud and there you go a backup and DR all at the same time.

  On 07/01/2013 at 17:51, BudMan said:

Just use svnsync to copy the files to your dropbox folder. Or have your script place your 7z files in the dropbox folder - and then dropbox will sync them to the cloud and there you go a backup and DR all at the same time.

The latter of your ideas is exactly what's going on right now ;)

move *.7z C:\Users\DB\Dropbox\Backups\SVN &gt;nul

Tell me though, when I was deciding which route to go down, it was a choice between hotcopy and dump, since these create a backup file. From a quick scan of Google, svnsync creates a replica. Which is easier to restore? Just got a VM installed to test out a restore using the file the batch script above makes... when I get a chance.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • I am still running Windows Vista. It is my favorite release of Windows.
    • True... they used the same core, but 7 worked out of the box. Vista made Me a superhero in comparison. See.. apps may have had issues running with Me because the changes were trash compared to 98SE. But I only installed Me one time and it ran, crashed.. .ran, maybe crashed some more. I made a living off of having customers reinstall Vista because it became unstable fast. Some may call 7, Vista SP3... but the final product doesn't compare to the original Vista core when they launched it. Even today, you're going to hear some that say they're still running 7, or will always have 7. Not Vista.
    • Oh man! I can't wait! 😁
    • slowness that result in unproductive, when something was easy fast one click now its basically 2 or 3 clicks and more mouse movement not the end of the world sure but forcing changes for the sake of it for no good reason its one reason why people dont like 11.
    • WhatsApp for Android expands chat themes with 18 new colors by Paul Hill The WhatsApp Beta for Android has just been updated to version 2.25.19.2 (via WABetaInfo) bringing with it 18 new color options, expanding the selection from 20 to 38 colors. This update brings the Android app up to parity with the iOS version, which got this beta update at the start of the month. The expansion of colors will give users greater personalization options for their WhatsApp chats. You can pick the new colors individually per chat or from the settings for every chat, complementing the existing support for various custom backgrounds. How the new chat themes work To set the new colors for individual chats, just open the chat you want to theme, press the three dot menu in the top right and go to themes and change the chat color. To change the theme color across the whole of the app, just go to settings and then select chats and change the chat theme. The new colors are compatible with both light and dark modes and affect the message bubbles. Unlike Messenger where theme changes can be seen by your contact, theme changes in WhatsApp are only visible to the user who applies it. User reception and future outlook Most people running WhatsApp are using the stable version, so you won’t see these new theme colors yet, we will have to wait a bit longer for that. Even if you’re on the beta, the feature may not be available yet as it’s being rolled out. While not a massive change, lots of people like to theme their WhatsApp messages so this change will be welcomed by those that do that. The messaging app scene is very competitive, so this will help Meta retain users on WhatsApp by boosting satisfaction. If you have had a chance to try out the new themes, let us know in the comments what you think!
  • Recent Achievements

    • Explorer
      Legend20 went up a rank
      Explorer
    • One Month Later
      jezzzy earned a badge
      One Month Later
    • First Post
      CSpera earned a badge
      First Post
    • One Month Later
      MIR JOHNNY BLAZE earned a badge
      One Month Later
    • Apprentice
      Wireless wookie went up a rank
      Apprentice
  • Popular Contributors

    1. 1
      +primortal
      617
    2. 2
      ATLien_0
      278
    3. 3
      +FloatingFatMan
      179
    4. 4
      Michael Scrip
      150
    5. 5
      Steven P.
      115
  • Tell a friend

    Love Neowin? Tell a friend!