1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Networks HOW-TO: Backup automatically via a network

Discussion in 'Hardware' started by iam, 14 Jan 2003.

  1. spirp

    spirp What's a Dremel?

    Joined:
    19 Dec 2003
    Posts:
    12
    Likes Received:
    0
    For all you linux/bsd/<put your flavor here> users, i'd suggest using either a rsync or a svn server.

    rsync is widely used as a syncronization software, as it allows of thight bandwidth scheduling, and it can be set to only update changed files. It is has many similarities with rcp/scp. It also has the possibilty to tunnel it all through ssh which might be a nifty feature to use if you plan on using off site backup. Most likely you'll be able to find rsync in your distro's package/port handler (for freebsd, it can be found in /usr/ports/net/rsync, for debian you can install it with apt-get install rsync).

    svn, or subversion, is most commonly used for versioning when developing software, and allows for several users to access/update the same file (which might be confusing), but it's very easy to use once you've set up the server software. It uses either apache2 and it's webdav modules in addition to it's own mod_dav_svn, or it's own server. The two different aproaches has pros/cons of their own, which is way out of scope to discuss here :). Anyway, this is quite nice as it allows windows users to backup data via a webdav-client (not all nifty features of svn is available though, as it extends the webdav standard way beyond it's goal :). Read more about svn at Tigris

    Both of the softwares described above allows for easy retrieval of files after a dataloss, which is arguably one of the key aspects of backups (what's the use with backups if it takes more time restoring them than recreating the data from scratch? ;)

    EDIT
    Just found Unison, seems interesting:
    http://www.cis.upenn.edu/~bcpierce/unison/

    Allows for sync between windows and unix-computers..

    /EDIT

    Happy backuping!

    //spirp
     
    Last edited: 27 Dec 2003
  2. RR5

    RR5 What's a Dremel?

    Joined:
    7 Dec 2003
    Posts:
    710
    Likes Received:
    0
    Just my insight.

    Xcopy is wonderful. I use a two pass method. Xcopy source [destination (can be network share)] /T

    I use /T with wildcards to pull off all files, leaving nothing to chance with clients needing all the *.doc files, but them not telling you where they are located.

    Right, after /T creates the directory structure, you'll use another xcopy command like the previous one, but instead of /T you'll use /E to copy all files in any directory/sub directory even empty ones (again leaving nothing to chance.)

    Now you'll have an exact working directory tree on a networked computer to restore from.

    Now, let me talk a little about NTBACKUP.EXE (win 2k and xp only)

    You can add it to the scheduled tasks.

    This is really simple and more for people with servers and one downlevel client.

    On the server you run ntbackup and click the backup tab. From there, you backup the system state data, all the files in the root directory of your servers hard drive. Eg C:\*.* excluding folders. You'll also want to choose the winnt or windows folder as well. (very important for windows 2000 server domain controllers)

    Now with that backup plan, you can restore server will not boot, domain errors, repair messed up windows errors.

    To take it another level, you can backup the program files folder, since you're backing up the windows / winnt folder.. the regsitery and installed programs would be safeguarded.

    Now, once all that choosing of what to be backed up is finished, its time to click Browse and navigate to a networked client running the same operating system as the server

    That is where you want the backup file to be sent to. The reason is simple. Server will not boot. Easy, use client to open ntbackup and point to that backup file, and restore then needed files so server is back online. Quickly.

    Added bonus, you can split the backup files to fit onto a cd r.
     
  3. p3n

    p3n What's a Dremel?

    Joined:
    31 Jan 2002
    Posts:
    778
    Likes Received:
    1
    Can someone post an example of howto copy from directory to directory on the same machine ?

    I need to copy folders and their contents from my hdd to a usb flash pen disk
    and also from the pen drive to another machine

    cos i want to use it on another machine thats win2k gotta use xcopy i guess ..

    elp!
     
  4. exile

    exile What's a Dremel?

    Joined:
    8 Mar 2004
    Posts:
    46
    Likes Received:
    0
    ummm ya. just do it like all the others, only use X: instead of \\svr for the destination.

    @Echo off
    xcopy "c:\My Documents" E:\ /D /E /V /I /H /R /Y
    echo Files Copyed

    (E:\ being pendrive)
    That what your looking for?
     
  5. Hitman

    Hitman Minimodder

    Joined:
    18 Oct 2002
    Posts:
    1,698
    Likes Received:
    29
    Ive just made a script to do this following Phat's example, and it works great.

    My only problem is that it wont copy my 'My Documents' folder. In the log it says:

    Only two non-switch arguments allowed.
    1st (src) = c:\Documents
    2nd (dst) = and
    3rd (bad) = Settings\Iain\My


    The source I have as 'c:\Documents and Settings\Iain\My Documents'. I think the problem is the spaces. But I cant get rid of the spaces, as then it cant find the directory.

    The second problem is scheduling it. I want to schedule it so that the PC boots, the bat file runs, then the PC shutsdown. I couldn't even get XP's task scheduler to boot the PC, and it cant seem to shut it down either.

    Perhaps some third party task scheduler could do this? Ive looked but cant find anything which will do all three things.
     
  6. cpemma

    cpemma Ecky thump

    Joined:
    27 Nov 2001
    Posts:
    12,328
    Likes Received:
    55
    If you put any path with spaces in in quotes it should work. With XXCopy I use a bat file with lines like
    Code:
    C:\windows\system32\XXCOPY.EXE "E:\Howard\My Documents\*.*" "G:\Backups\Howard\My Documents\"  /bn/r/e/q/y/V2
    
     
  7. Hitman

    Hitman Minimodder

    Joined:
    18 Oct 2002
    Posts:
    1,698
    Likes Received:
    29
    Ah ha! That works great!

    I even got the scheduling thing working.

    In the end I made a .bat file on the server which uses WOL to wake my PC a few minutes before the backup.bat file is scheduled to run on my PC. At the end of the backup.bat file I added 'shutdown -s', so that when its finished the PC will shutdown.
     
  8. zhenboy

    zhenboy What's a Dremel?

    Joined:
    23 Dec 2003
    Posts:
    270
    Likes Received:
    0
    :D All the methods are pretty good actually....should have a go with my rig at home...
     
  9. CaseyBlackburn

    CaseyBlackburn Network Techie

    Joined:
    27 Jul 2004
    Posts:
    1,846
    Likes Received:
    0
    I perfer using the xxcopy and copy method because it uses less space then the ntbackup.exe because if a file is changed it adds it to a new section and leaves the old one still there in another section but i perfer ntbackup.exe when backingup my webserver because then i have all old copies of the web pages so if someone hacks my web server and changes all files i still have a backup of the old ones.
     
  10. TJK

    TJK What's a Dremel?

    Joined:
    21 Nov 2004
    Posts:
    276
    Likes Received:
    0
    ok, me never doing this before doesnt help, but where do i do all this scripting?

    I have all this copy code that is set to my needs, but what do i run it in? Notepad? Word, some program i dont have? anyone wanna help?
     
  11. CaseyBlackburn

    CaseyBlackburn Network Techie

    Joined:
    27 Jul 2004
    Posts:
    1,846
    Likes Received:
    0
    Insert the code you have finished in Notepad and save it in the .bat extension and just double clicking the file will execute it.
     
  12. kickarse

    kickarse What's a Dremel?

    Joined:
    6 Oct 2004
    Posts:
    1,281
    Likes Received:
    0
    Why not just use a free program called Corbian Backup?
     
  13. cpemma

    cpemma Ecky thump

    Joined:
    27 Nov 2001
    Posts:
    12,328
    Likes Received:
    55
    After always losing something in a clean install, I went through the machine yesterday looking for all the things I wanted up-to-date copies of. I want an uncompressed duplicate tree for data, so most of the more "pro" programs were out, besides most were much less flexible and slower for a simple daily incremental backup. XXCopy won. A few switches I found useful:
    Code:
    :: Backup new & changed files with XXCopy to F drive
    ::
    C:
    cd C:\Windows\System32\
    
    :: Includes websites, music, pictures...
    xxcopy "E:\Howard\My Documents\" 
    "F:\Data Backups\Howard\My Documents" /E/BI/Q/Y/R/V2
    :: /BI copies all [B]changed [/B] and brand new files. 
    :: There could be a situation where you've deliberately replaced a source file 
    :: with an older version; it will join the backed-up set, unlike with the /BN 
    :: switch, which only backs up [B]newer[/B] (and brand-new) files. 
    :: /E backs up subdirectories, even empty ones
    :: /Q no display of skipped files
    :: /Y overwrite without prompting
    :: /R overwrite read-only files
    :: /V2 byte-by-byte verify
    
    xxcopy "E:\Howard\My Email\" 
    "F:\Data Backups\Howard\My Email" /E/BN/Q/Y/R/U/V2
    :: /U only copies files that already exist at the destination, so for email 
    :: I copy the lot manually then delete the ones in the destination I don't want
    :: - eg, the newsgroups. From then on it's automatic.
    
    xxcopy "D:\Program Files\Ambyr\StripboardMagic\Data\" 
    "F:\Data Backups\Program Files\Ambyr\StripboardMagic\Data\" /DA:1999-01-01/S/BI/Q/Y/R/V2
    
    :: /DA:1999-01-01 backs up files created after 1 Jan 1999 and, coupled with
    ::  /BI, provided they're not already backed up, so with a folder mainly full of
    :: as-supplied files, just the ones you've added or modified are saved. 
    :: Pick a date to suit.
    :: /S doesn't create empty subdirectories (unlike /E)
    
    Adding the paths was made easier with a free shell extension that even adds the quotes. Find the folder in Explorer, copy the path, paste into Notepad. :thumb:

    XXCopy, like XCopy, will copy across networks.
     
  14. fev

    fev Industry Fallout

    Joined:
    13 Aug 2003
    Posts:
    0
    Likes Received:
    20
    i get an invalid number of parameters error... a lil help?
     
  15. CaseyBlackburn

    CaseyBlackburn Network Techie

    Joined:
    27 Jul 2004
    Posts:
    1,846
    Likes Received:
    0
    Could you please be more specific on what you are doing?
     
  16. fev

    fev Industry Fallout

    Joined:
    13 Aug 2003
    Posts:
    0
    Likes Received:
    20
    that's my "script" with the proper things placed in...

    from my documents to my "mushroom" server
     
  17. CaseyBlackburn

    CaseyBlackburn Network Techie

    Joined:
    27 Jul 2004
    Posts:
    1,846
    Likes Received:
    0
    Only thing that is see is that:
    Should be:
    xcopy z:\*.* "C:\Documents and Settings\Mike Fethers\My Documents\" /D /E /V /C /L /H /Y
     
  18. fev

    fev Industry Fallout

    Joined:
    13 Aug 2003
    Posts:
    0
    Likes Received:
    20
    ta v. muchly
     
  19. CaseyBlackburn

    CaseyBlackburn Network Techie

    Joined:
    27 Jul 2004
    Posts:
    1,846
    Likes Received:
    0
    No problem, just remeber if your doing something like a path like that and there is spaces in it you need to put quotation marks around the path.
     
  20. kickarse

    kickarse What's a Dremel?

    Joined:
    6 Oct 2004
    Posts:
    1,281
    Likes Received:
    0
    Robocopy comes with the Windows 2003 Toolkit and is very similar to XXCopy, in fact both based on XCopy.
     
Tags:

Share This Page