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

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]

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.

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 >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

    • Price Drop: Save 86% on Microsoft Office 2021 Professional Plus lifetime digital license by Steven Parker Today's highlighted deal comes via our Apps + Software section of the Neowin Deals store, where you can save 86% on a lifetime license to Microsoft Office 2021 for Windows. This bundle is for families and small businesses who want classic Office apps and email. It includes Word, Excel, PowerPoint, Outlook, Teams, and OneNote. A one-time purchase installed on 1 Windows PC for use at home or work. Lifetime license for MS Word, Excel, PowerPoint, Outlook, Teams, & OneNote One-time purchase installed on 1 Windows PC for use at home or work Instant Delivery & Download – access your software license keys and download links instantly Free customer service – only the best support! Microsoft Office Professional 2021 (for Windows) includes: Microsoft Office Word Microsoft Office Excel Microsoft Office PowerPoint Microsoft Office Outlook Microsoft Office Teams Microsoft Office OneNote Microsoft Office Publisher Microsoft Office Access No faffing about with subscriptions, just classic apps that don't expire. Good to Know ONE-TIME PURCHASE INSTALLED ON 1 DEVICE Redemption deadline: redeem your code within 30 days of purchase Access options: desktop Full versions No subscriptions – no monthly/annual fees Version: 2021 Updates included* *Support for this version of Office ends on Oct 13, 2026 A lifetime subscription to Microsoft Office 2021 Professional normally costs $219.99, but this deal can be yours for just $29.97, that's a saving of $190. For full terms, specifications, and license info, click the link below. Get Microsoft Office Professional 2021 for just $29.97, or learn more Although priced in U.S. dollars, this deal is available for digital purchase worldwide. Support queries If you have queries or need support for any of the Neowin Deals, please use the contact form here. Neowin Deals are managed and sold by StackCommerce who represent Neowin on an affiliate basis. Why we post these deals We post these because we earn commission on each sale so as not to rely solely on advertising, which many of our readers block. It all helps toward paying staff reporters, servers and hosting costs. So for those that keep moaning and complaining, be thankful we're still online for you to even do that. Other ways to support Neowin Whitelist Neowin by not blocking our ads Create a free member account to see fewer ads Make a donation to support our day to day running costs Subscribe to Neowin - for $14 a year, or $28 a year for an ad-free experience Disclosure: Neowin benefits from revenue of each sale made through our branded deals site powered by StackCommerce.
    • The only reason I want to know where you from is because if you are not from the U.K, then why should you care what we in the U.K do or don't do? Racist I am not, I am fed up with the amount coming over here and feel they can come over here and think we need to support them. Do you know how much it costs this country to support these people coming over here? Even when we give them a place to live it is not good enough. We had a barge that was being used to house immigrants, oh but that was not good enough. A mate said to me at the time, when he was homeless, he would have been happy to live on the barge, instead of ending up sleeping on a bench on the beach. I am not scared to say what my family heritage is, unlike you who is scared to say where they are from or where they live. Father side U.S, mother side Wales, still have family living in the U.S. A mate who sadly died a few years ago, had a load of people from different races recording in his studio, I got on with all of them. Skin colour don't bother me, where they are from don't bother me. Religion don't bother me as long as they don't push it onto me and it is not crazy stuff. I am not religious. But if you are not living in the U.K, then why should you care if we are in the E.U or not? This the problem, too many people poking their noses into where it don't belong. But you believe what you believe, if you think I am racist, then be it, I really do not care. Just grow a pair
    • If he hasn't been able to figure that out, then why is he obsessed with tariffs? Because that's one of the most prominent tools to level the playing field when you have high cost of labor.
    • Microsoft released Windows 11 KB5102558, KB5095615 Setup and Recovery updates by Sayan Sen This past week Microsoft released the newest preview update (C-release) under KB5095093. Alongside those, Microsoft also released new dynamic updates. For those who may not know, dynamic updates bring improvements to the Windows Recovery process in the form of Windows Recovery Environment (WinRE) updates, which are also called Safe OS updates. The dynamic updates also affect the Setup file binaries in the form of Setup updates. These Dynamic Update packages are meant to be applied to existing Windows images prior to their deployment. Dynamic Updates also help preserve Language Pack (LP) and Features on Demand (FODs) content during the upgrade process. VBScript, for example, is currently an FOD on Windows 11 24H2. This time both recovery and setup updates were released for Windows 11. The company writes: "KB5095186: Safe OS Dynamic Update for Windows 11, version 26H1: June 23, 2026 This update makes improvements to the Windows recovery environment (WinRE). After installing this update, the WinRE version installed on the device should be 10.0.28000.2335. KB5102558: Setup Dynamic Update for Windows 11, versions 24H2 and 25H2: June 23, 2026 This update makes improvements to Windows setup binaries or any files that setup uses for feature updates in Windows 11, version 24H2 and Windows 11, version 25H2. KB5095615: Safe OS Dynamic Update for Windows 11, versions 24H2 and 25H2: June 23, 2026 This update makes improvements to the Windows recovery environment (WinRE). After installing this update, the WinRE version installed on the device should be 10.0.26100.8737." Microsoft notes that both the Recovery and Setup updates will be downloaded and installed automatically via the Windows Update channel.
  • Recent Achievements

    • Conversation Starter
      jessse3334 earned a badge
      Conversation Starter
    • Reacting Well
      JuvenileDelinquent earned a badge
      Reacting Well
    • One Month Later
      Excellence2025 earned a badge
      One Month Later
    • Week One Done
      Excellence2025 earned a badge
      Week One Done
    • Week One Done
      flexorcist earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      508
    2. 2
      +Edouard
      200
    3. 3
      PsYcHoKiLLa
      151
    4. 4
      Steven P.
      73
    5. 5
      macoman
      62
  • Tell a friend

    Love Neowin? Tell a friend!