Live Backup Revealed...
Live Backup briefly explained:
Live Backup is a tool I developed to be able to create a one-time backup of various files (this tool is not limited to just tables and VFP related files, it extends beyond that allowing any files that can be backed up) based on several locations. It can be on your local unit or those files can come from different units within the network. Other compression tools can only compress a single folder at a time, and so if you want to compress several folders from different units or locations, there are only two ways to do that.
a. Compress individual folders directly from location (imagine the network packets it will consume if compressed over the network for files located in other computers).
b. Combine all those folders into one location and perform a single compressed file.
Letter b above led me to the creation of a temp folder, the process I called snapshot creation. It will combine all those folders located on several units or from several locations of your local and external harddrives into a temporary location; then compress it with one go! The creation of snapshot folder also ensures that there would be no huge increase in traffic over the network plus give more assurance over the integrity of the compressed file as opposed to compressing directly over the network. I believe it is faster that way and safer. Below are some more changes/updates for this deemed final release:
version 2.1.3
- Added an "abort" feature via pressing Escape key
- Added Internet Connectivity detection before downloading of 7-Zip installer
- Added back ability to choose Snapshot folder
- Added option for including/excluding sub-directories
- Changed cleaning method to remove every trace of snapshot folder. Originally, I only delete the files inside leaving folders intact. Wiped those out entirely via combination of scripting and Native VFP commands
- Modified the skins to compensate for added new options.
Although I planned to change the way Live Backup detects the compression engine, I decided later that it is not wise. Right now it is and still detecting the compression engine on the Program Files folder (default location of 7-Zip and WinRAR). When I tried to change detection via file association is when I realized the futility of that design in this particular case. Even when 7-zip is not installed in your unit, there is a huge chance that it will be treated as installed via this file association detection scheme. How? If another compression engine is installed on your unit, it might support 7z format. Though WinRAR only provides compression on a RAR, ZIP, and SFX formats; it however recognizes likewise other compression formats like 7z, thus, 7z and other more compression format is in fact also associated with WinRAR and I believe other compressors as well. So detection is stuck to the simple method of GetEnv().
By releasing this whole project, I am hoping that not only the tool will be useful to interested people but also the codes I used here. I combined a lot of things to make this work to what I deem is what really is needed. You will find that Native VFP commands are combined with WinAPI, scripting and batch job calls. I have to resort to those because there are some limitations of VFP specially with folder manipulations. You can also find here that combining some tricks and classes from my blogs will make an app look very very attractive and competitive in the market. It is my belief that looks help a package very much.
Previous Updates:
Updates in 2.1.2
- Installed "GetDir()" network folder capability via API
- Added sort of mirroring capability, redirecting uncompressed files to Archive destination instead of the local temp path
- Corrected Session logging.
- Added back RAR format compression (dependent whether WinRAR is detected on your unit or not)
- Due to my change last time to give a one-shot creation of sub-folders, it resulted to repeated lines of existing sub-folders. Fixed!
- Replaced _screen variable on holding temp path with form's property. _screen is an overkill in this case.
Updates in 2.1.1
- Added skinning ability, now it have three skins to satisfy the taste of various users. Live-Backup will retain the skin that is active when you closed it.
- Added log summary. It will now show you the elapsed time in hours, minutes and days. It will also inform you the number of files backed-up successfully!
- Changed to my Vista Flat Title Bar class. It is more neutral for the skins.
Updates in 2.1
- Auto-detects the 7-Zip compression engine, once not found, can download it for you
- Fixed bug in showing the Archive Destination GetDir() popup
- Fixed problem in moving the form around
- Used config.fpw to hide main window as contrasted to just moving it away
- Changed compression engine from WinRAR to 7-ZIP
I decided to release this now as I can't think of any more modification/enhancement to be made for this one at the moment. So for those who requested the
source codes of this one, you will find attached below the
whole project. Enjoy!