XP application data backup

2008/06/04 by Lassi A. Liikkanen

How to backup application data files in Windows XP

Below you'll find a simple script that uses Windows standard utilities (xcopy and find) to create timestamped backups of your application data.

The backup script

This should be saved into a file c:\app_data_backup.bat or similar. Change the variables DB, TEMPPI and MYBACKUPDIR to match your system

@echo off

REM Application data backup script 
REM by Lassi A. Liikkanen
REM created 2008/03/14


FOR /F "TOKENS=1-4* DELIMS=. " %%A IN ('DATE/T') DO (
	SET Year=%%D
	SET Month=%%C
	SET Day=%%B
	)

SET BD=%Year%%Month%%Day%
SET TEMPPI=D:\noBackup.txt
set MYBACKUPDIR=R:\MaltanDocSetsLiikkane\%BD%

set SRC1=C:\Documents and Settings\liikkane\Application Data
set SRC2=C:\Documents and Settings\liikkane\Templates

set MYENLDIR=R:\SSH_PB\Literature_references
set MYENLFILE=SSH

echo %MYBACKUPDIR%
echo %SRC1%
echo %SRC2%

IF NOT EXIST %MYBACKUPDIR%\AppData mkdir %MYBACKUPDIR%\AppData
IF NOT EXIST %MYBACKUPDIR%\Templates mkdir %MYBACKUPDIR%\Templates

xcopy "%SRC2%" "%MYBACKUPDIR%\Templates" /S /Y
xcopy "%SRC1%" "%MYBACKUPDIR%\AppDAta" /S /Y /EXCLUDE:%TEMPPI%

The exclusion file

To prevent saving certain data (e.g. Opera browser cached files), you can use exclude file as done in the script above. The file should contain a list of filename to be skipped (see example below). This should be saved into a file e.g. c:\exclude.txt

cache4

Related content:
How Windows 7 restore really works, 2014/04/26

Instructions for creating bootable Windows 7 recovery environment on a USB flash device, 2014/03/30

Disabling background software installations and upgrades in Windows, 2013/03/03

No comments for this page
Add comment | Show all comments

Name*:
Email*:
Your email will not be shown publicly or disclosed to third parties, it is used to validate messages
Location (City, Country):
* This information must be provided

Keywords: [windows] , [computers] Document's status: Ok (Document dates explained)

This document created: 2008/06/04
Modified: 2008/06/04
Published: 2008/06/04


This document's permanent URI (linking):
http://iki.fi/lassial/guides/windows/080604-XP_application_data_backup

© Lassi A. Liikkanen 2008 - 2016. All rights reserved.
^Top of the Page^

*Change layout:
Printable printable
Large text

Myydään:

@lassial Twitter feed: