# use HoboCopy to make a backup of my pst file using VSS. HoboCopy “c:\inbox backup” “C:\Documents and Settings\dvassallo\Desktop\ForFTP” personal.pst If exist “C:\Documents and Settings\dvassallo\Desktop\ForFTP\personal.pst” del “C:\Documents and Settings\dvassallo\Desktop\ForFTP\personal.pst” # the above section is the same as the previous scriptħz u heccpc%var%.zip “C:\Documents and Settings\dvassallo\Desktop\DaveKBase” > ftpbackuplog.txt However in this script I know uses SCP and VSS: The second script is similar to the first, so i’ll skip over the parts which are similar. The first line is the username, the second line is the password, followed by normal FTP commands (look them up here) The actual ftp script commands are stored in a seperate txt file, and contain the commands used by the ftp client. Read the above line as saying: “Run the FTP commands in ftpscript.txt, towards the FTP server located at, and log everything to ftpbackuplog.txt MS built in FTP client allows you to run a series of FTP commands as specified in a file. # the above line calls a microsoft FTP script. # use 7zip to backup the contents of a folder into a ZIP archiveħz a heccpc%var%.zip “C:\Documents and Settings\d.vassallo\Desktop\ForFTP” > ftpbackuplog.txtįtp -s:ftpscript.txt > ftpbackuplog.txt # for logging purposes, log the date the processes started into a logfileħz a heccpc%var%.zip “C:\Documents and Settings\d.vassallo\Desktop\DaveKBase” > ftpbackuplog.txt #delete the previous backup, if it exists #In this section I implement the above by detecting the presence ofone of the text files and setting appropriate variables If “ftpbackupv1.txt” was present, then write to the first backup, if “ftpbackupv2.txt” was present, then write to the second backup I accomplished this by simply creating a text file with a specific name. One backup gets written, then another, then the older backup gets overwritten, and so on. Basically, I wanted to keep two versions of my files in a round-robin fashion. #I wanted to inlcude “versioning” into my backup system, that is, I wnated to keep the most current, and the before-last versions of my files. First comes a simple script that uses FTP, with no VSS: I will comment on each line behind the # symbol. Of course, everything I outlined above can simply be done using the windows backup utility, but that wouldnt be half as fun now would it? Anyways for all those who prefer using the windows NT backup client, I included it at the end of the blog post… To this end, I found the very good, free, scriptable utility that leverages VSS called Hobocopy. To get around this, I decided to use window’s VSS, or Volume Shadow Service, which allows you to backup files which are in use. pst file resulted in an error since the file is locked and in use. Since while working I am constantly using outlook, simply trying to copy and compress the. Its free, opensource, and has a scriptable component, making it an ideal choice. My compression client of choice has always been 7-zip. Later, due to security concerns (dont forget FTP sends everything in clear text), I decided to transfer everything using SCP (secure copy protocol) which basically uses SSH to transfer over files, making it much more secure. To be able to backup offsite, I setup my SheevaPlug to be an FTP server and modified my backup script to automatically connect to that server and transfer all data there. BAT files which dont need any other programming environment other than that provided by the humble windows shell. At work we use Windows XP computers, so the scripts I wrote had to be. Read about them here.Īlso, note that I am not actually talking about baremetal recover (that will be a good topic for another blog post, stay tuned) but of backing up certain files and applications.īack to the subject at hand. However, I always prefer finding open-source, or freeware alternativesĪs a sidenote, I recently ran across an open source backup platform called Zmanda which looked quite cool, and I actually did manage to setup their proposed system in about 15 minutes. There are of course many 3-rd party applications that do this well, and indeed SonicWALL provides CDP (continuous data protection) which does an admirable job and actually does it really easily. I wanted a backup script that would automatically backup these files regularly, and preferably store them offsite. pst file and a folder containing important work documents. These are usually some MySQL database backend for a website, the website content itself, my Outlook. On my work PC I have several important files and folders that I would regularly want to backup.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |