HOW TO: Backup across the network automatically [background info] [notepad]


Best Answer: Before you do any of this, record your connection's Subnet mask, Default Gateway and DNS addresses. To do this go to start>run>type in "cmd" , type in "ipconfig" and record the numbers of the subnet mask, the default gateway and the DNS addresses. (Note if you don't see "DNS server", don't worry about it.)

To give your computer a static IP address:
Head to the control panel

Get into network connections,

Right click the connection that you're using and press properties. (The one you're using has an icon with 1 or 2 blue monitors with no X in it)

Double click on "Internet Protocol (TCP/IP)

Select "Use the following IP address" and type in the IP address they asked you to put in.

Then input the addresses you took down for the "Subnet Mask' and the "Default Gateway"

Press Ok then ok again and..
That's it!

Hope this helps! :)


Re:Yeah, xcopy is a great way to catch all subdirectories, as well as a couple other options handy for backups.

/D:m-d-y Allows you to only copy files that have changed since a certain date. Using %% variables, I'm sure there is a way to write the time of the last backup to a system variable and use this to do incrementals.

/EXCLUDE:file In case you know there are a couple of files in there that won't copy and want to avoid them.

/S Copies directories and subdirectories. :)

/V Verify

/C Continues even if errors occur (good for middle of the night backups that you don't want to stall out)

/Y Supress prompting for overwriting files (also good for midnight backups)

There are some others, but those would be the most common.

Also, for scheduling, there is a cool command called "at".

It works like this:

(I'm just going to use a direct example from one of my scripts)

rem Start with clearing JobIDs
at /delete /yes

rem Ecat Items and Categories
at 02:00 /INTERACTIVE /every:T,W,Th,F,S,Su "C:\Program Files\Replication.exe" /replicate /63

When you run "at" it loads the jobs into memory, and they don't go away even after a reboot. We found the easiest way to keep it consistent and allow easy changes was to just delete all of the jobs in memory before going through the rest of the script.

Then the next command sets the times (and I actually have 7-8 of those in there, just posted one for example) and days that it is to run. The program to run is in quotes, the switches on the end get appended just like they normally would, I'm not sure why they don't go in the quotes, but it works just fine this way.

We just have the script file in the startup folder so it loads every time, clears all jobs, then queues up all of the ones in the script. We have it running things 4 times a day, one thing only 3 days per week, and another just on weekends.

If you got really creative on this you could have an automatic backup process that did incrementals during the week, fulls on the weekends, and kept running all the time.

Pretty good solution with only having to learn two commands. ;)


Re:Anything to make back ups easy for people gets my nod of approval, I get so sick of hearing "isn't there some other way to get it back" :)

Re:Originally posted by: guy
adapted for *nix users:

As root, add this to your crontab at the desired interval:
/usr/local/bin/rsync -qave ssh $BACKUPDIRECTORY $USER@$TARGETHOST:$TARGETDIRECTORY

( i call it from a script doing other things but I think the variables are clear) ;)

Cheers mate :D


Re:adapted for *nix users:

As root, add this to your crontab at the desired interval:
/usr/local/bin/rsync -qave ssh $BACKUPDIRECTORY $USER@$TARGETHOST:$TARGETDIRECTORY

( i call it from a script doing other things but I think the variables are clear) ;)


Re:Aha! Xcopy looks much better! Particuarly the /D parameter

Once it's all tested etc the HOW-TO will be duly edited.

Thanks again s'ah :)


Re:Hallo s'ah :) Don't worry, a lot more (hopefully useful) long posts will be on their way :D

Never used xcopy s'ah, I'll have to take a look :)

/xcopy /? ;)


Re:Welcome to the forums! Pretty darn good way to start here by writing a big long article :P

btw, you should probably use xcopy instead of copy ;)


Related posts

Leave a comment

0 Comments.

Leave a Reply


click to changeSecurity Code

[ Ctrl + Enter ]