Thread: [GUIDE] Backup Private Server To Networked Drive/External Drive Automatically

Results 1 to 3 of 3
  1. #1 [GUIDE] Backup Private Server To Networked Drive/External Drive Automatically 
    Registered Member
    Join Date
    Aug 2015
    Thanks given
    Thanks received
    Rep Power
    I'm not sure if this would be the right area to put this in - please move where necessary if needed. Apologies in advance.

    Okay so for all of you developers out there - I'm one of the guilty ones who is very lazy at backing up my files and never really doing it often. Now I'm needing to change my ways and provided a better way of doing it and thought I'd share it with you all just in case you may need/want it.

    So with that said, lets begin.

    Network Drive Tutorial

    Spoiler for Network Tutorial:

    Backup to a Network Drive

    This is really simple, surprisingly. If you're running Windows it makes it even easier. I'll update this tutorial on how to get it running on OS X and Linux if needed so just ask me.

    Firstly download Vista Subst for Windows [Only registered and activated users can see links. ]

    Now run it, install it and when you run the .exe file you should see this:

    Spoiler for Vista Subst:

    Now for me, as you can see I'm using google drive. So all I have to do is type this into the bar at the bottom and assign it a drive letter:

    Spoiler for Vista Subst:

    Make sure you tick the box to assign the drives on Windows Startup. Makes your life a lot easier.

    After that, you're ready to make the .bat script to copy all your files across. I put one together myself for you guys to edit how you like.

    Open up any text editor. (I personally used Notepad++) and put in this code:

    @echo off
    echo Backup Script
    echo Press any button to start backup.
    pause >nul
    xcopy "C:\Directory-To-Server-Folder" "G:\Directory-To-Networked-Drive\" /D /E /C /R /H /I /K /Y /O
    echo All files complete.
    Modify that as needed. Remember the letter you assigned your networked drive to and in my case it was "G:" so you're going to need to change it to whatever you assigned it to.

    After that save the script as "filename.bat" < make sure you have .bat at the end and run the script! It should successfully copy over the files.

    External Drive Tutorial

    Spoiler for External Tutorial:

    Backup to an External Drive

    Okay this is all completely automated which is fun and I've also put together a batch script to run for this aswell. It will automatically pick up your mounted drive and copy all files to this drive.

    Open up a text editor (I used Notepad++) and input this code:

    @echo off
    set "USBDrive="
    for /F "tokens=1,2" %%a in ('wmic logicaldisk get DeviceID^,DriveType') do if %%b equ 2 set USBDrive=%%a
    if not defined USBDrive (
       echo USB not connected
    ) else (
       echo USB on drive %USBDrive%
    pause >nul
    echo Press any button to copy to %USBDrive%
    xcopy "C:\Directory-To-Server-Folder" %USBDrive% /D /E /C /R /H /I /K /Y /O
    Save the file as "yourfilename.bat" and run it!

    After reading the tutorials and if you use any of these methods then you can use the "Windows Task Scheduler" to run these scripts anytime you want daily/weekly etc.
    Reply With Quote  

  2. Thankful users:

  3. #2  
    Registered Member
    Join Date
    Jul 2013
    Thanks given
    Thanks received
    Rep Power
    Thanks for that
    Reply With Quote  

  4. #3  
    Registered Member
    Join Date
    Jan 2013
    Thanks given
    Thanks received
    Rep Power
    While this is very helpful, I recommend to use git such as GitHub or BitBucket. Not only are they reliable, but allows you to keep track of progress and revert changes at anytime to your work. Also increases productivity among group based projects.
    Reply With Quote  

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

User Tag List

Similar Threads

  1. A good runescape private server to play?
    By Hofmann in forum Help
    Replies: 5
    Last Post: 05-01-2014, 10:48 AM
  2. Replies: 401
    Last Post: 05-09-2012, 05:31 PM
  3. You guys are taking Private Servers to Serious.
    By Sargent Neebensnicker in forum RS2 Server
    Replies: 18
    Last Post: 11-04-2008, 12:26 AM
  4. Replies: 1
    Last Post: 11-17-2007, 05:17 AM
  5. Replies: 142
    Last Post: 10-31-2007, 05:32 PM
Tags for this Thread

View Tag Cloud

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts