|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (10 bit)
Join Date: Nov 2004
Posts: 800
|
Windows Backup Batch File
Here is one from work that someone might find useful. It saves some key data as an incremental backup, and makes a log for you.For anyone that didn't already know, it is a batch file, so save it in notepad with a .bat extention. You can of course schedule it to run at intervals or whatever, or just run it manually on occasion.
Code:
@echo off cls c: cd\ :: ************************************************************************************* :: BackUp Key Data.bat 8/10/06 Final :: Should be done Daily by user (sceduled) :: WINDOWS-XP & 2000 (TESTED) :: XCOPY /switches SOURCE DESTINATION :: source Area (My Documents) (Favorites) (Outlook) & User Specified :: Destination = Personal Network Drive (P: at work) :: also creates/appends a log of these backups C:\bu-key.log :: ************************************************************************************* echo echo Starting back-Up of Key Files to Server >> C:\bu-key.log echo Starting back-Up of Key Files to Server echo First time could take a few minutes............ dir C:\bu-key.* >> c:\bu-key.log :: :: YOU MUST CHECK EACH SOURCE AREA BEFORE RUNNING FIRST TIME :: ========================================================= :: :: The & user specified part refers to how I have to change it and add stuff for some people, for instance: Code:
:: |
|
|
|
|
|
#2 |
|
Come in Ray...
Join Date: Sep 2004
Posts: 1,668
|
Good script, I have one similar I run to backup our company files, just a few things to add though:
1. I do a full backup once a week and incremental backups nightly. You can copy just the files that changed that day using the "date" parameter of xcopy. 2. After the backup is completed you may want to compress the files since you probably will not be going to backup files very often. We have 25 gigs of data that compresses to around 7-8 gig. The utility I use is 7-Zip's command line tool. 3. To keep 3 weeks worth of backups and delete the old. I use a simple folder structure and the start of every weekly full backup goes like this: a. delete week3 backups b. move week2 backups to week3 c. move week1 backups to week2 d. backup current files to week1 This way you don't have to worry about backups consuming much space. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|