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

    • It's a Dell color laser printer. Back when Microsoft kept having these security flaws with the print spooler and recommending you disable it I just got in the habit of it, and I use it so rarely now I just leave it disabled in case another flaw pops up.
    • KDE makes progress toward full Wayland session restore in Plasma 6.5 by David Uzondu In the latest issue of This Week in Plasma, the development team, as usual, brings news of ongoing work for the desktop environment. While KDE continues to polish the recently released Plasma 6.4, work has already taken off on the next major version of Plasma, 6.5. A significant step forward is being made on Wayland session restoration; the xx-session-management-v1 restore protocol has been implemented in Qt 6.10, which means KDE applications and Plasma itself can soon start using it to finally bring proper session restore to Wayland. For more immediate user-facing changes in Plasma 6.5, the Welcome Center application now teaches you about the many available keyboard shortcuts, as well as "what the heck the 'Meta' key is." For those who frequently work remotely, Plasma's built-in RDP server now supports syncing clipboard text between the client and server. The clipboard also received another useful feature, letting you copy the QR code for an item, not just view it. The team is also addressing smaller usability issues across the desktop, including fixes that will land in point releases for Plasma 6.4. Spectacle, for example, will no longer show a ghostly semi-transparent version of its menus in screenshots. The New! badge, which was introduced in Plasma 6.4 is now easier to read with better colors. Other notable UI improvements include: A new button on the "missed notifications" pop-up that lets you view what you actually missed. The Networks widget is now much better at telling you what it is doing, like when it is "looking for wireless networks". Inertial scrolling with touchpads is now active in all QtQuick-based KDE software. As always, the KDE team spent the week squashing bugs across various versions of Plasma and related software. Plasma 6.4.1, which went live this Tuesday, addressed several crashes in the desktop portal implementations and patched the open/save dialog, where apps could insert extra UI elements in the wrong places. It also resolved a recent performance regression affecting some games and fixed a strange issue with drawing tablets where the pointer could disappear when two were connected in different modes. 6.4.1 tackled a particularly odd hardware-specific problem with Samsung Odyssey G5 monitors endlessly turning on and off because of a faulty DDC implementation. KDE responded by blacklisting the device. In addition to that, the update fixed an accessibility regression in Discover, corrected an issue where deleting a favorited app left behind a ghost item you couldn't un-favorite, and restored the Window List widget's ability to minimize windows. As for fixes planned for 6.4.2, here's the full list as outlined by the Plasma team: Fixed a case where System Settings' Flatpak App Permissions page could cause the whole app to crash. Fixed an issue that could sometimes cause Plasma to go back to sleep again right after waking up, when the "Sleep then hibernate" setting is in use. The appearance of text labels in Folder View pop-ups is once again correct. You're no longer erroneously prompted to authenticate for a Wireguard VPN whose credentials are already stored in KWallet, and the wallet is set up to automatically open at login. Fixed an issue in the KDE desktop portal's screenshot implementation that prevented the delay setting from taking effect. Missing app backends listed in Discover's Settings page once again show the correct names. The brightness level shown on System Settings' Display & Monitor page now matches the one shown in Plasma. Fixed an issue that caused the panel to have too much space in it until restarting Plasma if you stop displaying the date on a horizontally-laid-out Digital Clock widget. The older Plasma 6.3.6 fixed video stuttering on variable-refresh-rate screens and patched the Weather Report widget after Environment Canada changed its data format. You can check out the full update on the official KDE Blog.
    • I'm happy with my setup. I have a raid 1 two drive Synology setup that I backup with Time Machine to every so often. What is your setup at home? 
    • Enterprise support (ex. Premier Support) is a bit different cup of coffee. I am not saying it is great, but they have SLAs and I have received solution within hours and even patches within 3 days.
    • Thank you, for not reading the comments above and just reading the root comment... it is just like reading only the headline of an article.
  • Recent Achievements

    • One Year In
      TsunadeMama earned a badge
      One Year In
    • Week One Done
      shaheen earned a badge
      Week One Done
    • Dedicated
      Cole Multipass earned a badge
      Dedicated
    • Week One Done
      Alexander 001 earned a badge
      Week One Done
    • Week One Done
      icecreamconesleeves earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      569
    2. 2
      ATLien_0
      187
    3. 3
      +FloatingFatMan
      184
    4. 4
      Skyfrog
      112
    5. 5
      Som
      108
  • Tell a friend

    Love Neowin? Tell a friend!