MarryMeWIthMyMoney
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Robocopy for backup purposes.

Go down

Robocopy for backup purposes. Empty Robocopy for backup purposes.

Post  MHolmes Tue Feb 01, 2011 2:00 pm

For purposes of backup.

The following script will make a complete copy of the current target and copy it to the destination. I used this script for backup up file from a PC to external, especially at home.

If using windows Vista or 7 Robocopy is already a part of your system, otherwise if using server 2003 or windows XP you will need to download and install the 2003 resource kit. Server 2003 resource kit

open up notepad and paste in the following text between the ---- lines. Change "C:\sourceFolder" and "V:\DestinationFolder" to appropriate folder locations. The folder does not have to exist on the destination drive. The script will create the folder and all folder structure below on the destination drive. Then save the file as Backup.cmd(make sure you do not also have .txt on the end. Otherwise save as backup.txt and then find the file and change it to .cmd. It will ask if you are sure you want to change the file type, this is ok to do.

----------------------------
@echo OFF
C:\Windows\System32\ROBOCOPY C:\sourceFolder\ V:\DestinationFolder\ /MT /PURGE /XO /E /XD "_RESTORE" "MSOCache" "Recycled" "RECYCLER" "Temporary Internet Files" "System Volume Information"

Goto Done
:Done
Echo Done
Pause

Stop
---------------------
After you have your script created, double click it and let it backup your files.

This script will only copy files that have changed, so after you run it once, future running of this script will be much quicker. If you delete files on the source the script will also delete the files from the destination when the script is run. Again this script is to create a complete backup of the source on the destination including deletions of files from the source. This process is great for creating backups of your music, pictures, movies, or etc to an external usb drive. Given that external usb drive prices have fallen drastically, this is something everyone should do if they deem their home files important what so ever.
MHolmes
MHolmes
Admin

Posts : 14
Join date : 2011-01-11
Age : 41
Location : Omaha, NE

https://omahaitcoalition.board-directory.net

Back to top Go down

Robocopy for backup purposes. Empty Re: Robocopy for backup purposes.

Post  MHolmes Tue Feb 01, 2011 2:06 pm

You can dupicate the

C:\Windows\System32\ROBOCOPY C:\sourceFolder\ V:\DestinationFolder\ /MT /PURGE /XO /E /XD "_RESTORE" "MSOCache" "Recycled" "RECYCLER" "Temporary Internet Files" "System Volume Information"

line as many times as you want for backing up multiple folders to differing locations.
MHolmes
MHolmes
Admin

Posts : 14
Join date : 2011-01-11
Age : 41
Location : Omaha, NE

https://omahaitcoalition.board-directory.net

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum