This repository contains DOS batch scripts which help you back up your files on a Windows computer. The scripts use the great programs 7-Zip and Unison.
archivedir.bat
takes a folder, compresses it using 7-Zip, attaches a datestamp, and puts it in a folder of your choosing. mirror.bat
mirrors (i.e. backs up) a folder to a second one. A sensible strategy would be to use mirror.bat
regularly (e.g. daily) to mirror your data, while applying archivedir.bat
only occasionally to copy the compressed folder with a timestamp to an external drive.
You need 7-Zip and Unison installed on your Windows machine. Go to 7-Zip.org to install 7-Zip, if it is not already installed on your computer. Please specify the location of the executable in the script under Location of 7zip
in file archivedir.bat. To install Unison, download the Windows binaries and extract only the text version (e.g. unison X.XX.X text.exe
) to a location of your choosing. Then, specify latter location in file mirror.bat under Location of unison
.
Type archivedir.bat [Source directory] [Target directory]
to take contents of [Source directory]
, compress them, and put the compressed file into [Target directory]
. Similarly, enter mirror.bat [Source directory] [Target directory]
to mirror (i.e. back up) [Source directory]
into [Target directory]
.