How often do you backup your data? The more data you receive, the more you will need to back up.

For most of us, a weekly backup will be sufficient. If you find that valuable data is being manipulated every day then do a daily backup. The classic schedule involves a backup at the end of each business day, so that’s five backup per week. Whatever tools you use, the model of the story is to back up and back up now, don't put it off till tomorrow, it could be too late and your data will be lost! What you need to do here is, get an external hard disk and get the ball rolling now. Don't put off this task and risk losing your precious data. Most of us, the important data are stored in Desktop, My Documents,  Favorites and Microsoft Outlook PST.

Here is a batch file I recently wrote. The problem to be solved was that (Hope will solve the tedious backup task) Additionally, it was useful (when swapping out computers) to migrate a user’s Data from the old computer to the new. Both of these could be solved by moving the Data up onto a personal network drive to which they always had access.

Where does Outlook keep my PST file? You need to backup or make a copy of your mail folders in Outlook, which as you know are stored in something called a "PST" file. You’ve  looked everywhere and can't find it. Where does Outlook hide your email? Lets this batch program resolve your problem…

You can save your text in a file and then follow the steps below:

1. Create a text file in Desktop

backupdata1

 

2. Copy the following text and paste it into a text file and then rename the file to Backup and Restore.bat

ECHO OFF
CLS
:MENU
ECHO.
ECHO                 ***************************************************
ECHO                 *   Backup and Restore your Data Quick and Easy   *
ECHO                 ***************************************************
ECHO.
ECHO 1 - Export Desktop, Favorites, My Documents and PST from COMPUTER to PERSONAL DRIVE (E:)
ECHO 2 - Import Desktop, Favorites, My Documents and PST from PERSONAL DRIVE (E:) to COMPUTER
ECHO 3 - EXIT
ECHO.
ECHO Option 1: Use this option if you want to backup your data to an external HDD device.
ECHO Option 2: Use this option if you would like to restore or migrate your data to new computer.
ECHO        (Be caution, Option 2 will replace or overwrite your existing data)
ECHO Option 3: Exit the program.
ECHO.
SET /P M=Type 1, 2, or 3, then press ENTER:
IF %M%==1 GOTO EXPORT
IF %M%==2 GOTO IMPORT
IF %M%==3 GOTO EOF
IF %ERRORLEVEL% NEQ 1 GOTO INVALID
REM IF the input are Not Equal to 1, it will prompt the following error message.
:INVALID
CLS
ECHO         ======================================================================
ECHO         =                                                                    =
ECHO         = HEY DUDE! THIS IS INVALID KEYWORD, PLEASE ENTER THE VALID KEYWORD! =
ECHO         =                                                                    =
ECHO         ======================================================================
GOTO MENU
:EXPORT
XCOPY "%userprofile%"\Desktop\*.* E:\Backup\Desktop\ /S/Y
XCOPY "%userprofile%"\Favorites\*.* E:\Backup\Favorites\ /S/Y
XCOPY "%userprofile%"\"My Documents"\*.* E:\Backup\"My Documents"\ /S/Y
XCOPY "%userprofile%"\"Local Settings"\"Application Data"\Microsoft\Outlook\*.* E:\Backup\PST\ /S/Y
GOTO MENU
:IMPORT
XCOPY E:\Backup\Desktop "%userprofile%"\Desktop\*.* /S
XCOPY E:\Backup\Favorites "%userprofile%"\Favorites\*.* /S
XCOPY E:\Backup\"My Documents" "%userprofile%"\"My Documents"\*.* /S
XCOPY E:\Backup\PST "%userprofile%"\"Local Settings"\"Application Data"\Microsoft\Outlook\*.* /S
GOTO MENU

 

3. Change the file type from .txt to .bat (Batch file)

backupdata2

 

4. After renamed:

 backupdata3

 

5. Double Click on the "Backup and Restore.bat" to run the batch file:

backupdata5

6. Connect your external Harddisk / Pendrive now.

backupdata6

7. Open My Computer, the External HDD device has been assigned as Drive letter E:

(Make sure your drive letter are assigned as drive E: else, please change the drive letter in the script or you may re-assign the letter drive from your local host.)

P/S: Close your Microsoft outlook application or those file that need to backups before you begin the backup task.

backupdata7

8. Press 1 to export the data from Local HDD to External HDD. You should able to see the data are transferring to the external HDD.

 backupdata8

9. Done. All your data can be found in External HDD E:/backup/

Easy right? Post your comment if you like it... Thanks. :)