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 saying if they put MC outside compute tile, it is DOA for gaming, in other words will be a failure like 285k unless they do some magic with MC, but I doubt it. It is that simple.
    • One of the reasons Windows is in use is because of compatibility with hardware and software, but it isn't perfect and there are gaps. This software can help maintain compatibility with older hardware and software the way DOSBox helps us now.
    • This can help with compatibility the way DOSBox helps us now. There are a lot of old drivers, software, and hardware that don't work in current Windows. This could also help older hardware still be relevant because you can install it directly on devices where current Windows versions are no longer supported.
    • Nexus Mods owner steps down citing toll on personal wellbeing by Usama Jawad If you've ever been involved in the gaming landscape, there is a good chance that you have heard of Nexus Mods. It's one of the largest websites offering game modifications online with millions of registered members. The site hosts mods for numerous popular titles including The Witcher 3, The Elder Scrolls, Elden Ring, Dark Souls, and Fallout, among others. Now, the creator of the site has announced that ownership of Nexus Mods is changing hands, 24 years after its inception. In a blog post, the site's creator, Robin Scott - also known as "Dark0ne" in the community -, has announced that he is stepping down from managing the site on a daily basis and is actually handing over Nexus Mods to a new owner. Interestingly, this owner has not been named yet, but it seems like the community will be seeing a lot more of Foledinho (Victor) and Rapsak (Marinus) in daily operations. Scott says that ever since starting the site back in 2001, his adult life has been pretty much consumed by running Nexus Mods and managing its "major social network". This has almost been an on-call position, which has taken a toll on his personal wellbeing and health due to the accompanying stress and anxiety. As such, Scott has decided to step down from his executive role to avoid further burnout. Although Scott has not revealed the identity of the new owners, he says that his exit is purely for personal reasons and not some corporate backdoor deal. The site's creator will still be around in the forums and Mod Author Discord, providing direction when needed without taking responsibility. Scott's announcement has been mostly met with praise and thanks from the community. Though, as may be expected from a rather diverse and often polarized audience, the discussion did recently veer off-course and has now been locked from further engagement by community mods.
  • Recent Achievements

    • Enthusiast
      Motoman26 went up a rank
      Enthusiast
    • Mentor
      M. Murcek went up a rank
      Mentor
    • Explorer
      treker_ed went up a rank
      Explorer
    • Apprentice
      CHUNWEI went up a rank
      Apprentice
    • Veteran
      1337ish went up a rank
      Veteran
  • Popular Contributors

    1. 1
      +primortal
      672
    2. 2
      ATLien_0
      269
    3. 3
      +FloatingFatMan
      176
    4. 4
      Michael Scrip
      173
    5. 5
      Steven P.
      139
  • Tell a friend

    Love Neowin? Tell a friend!