About a month ago I started working with the IDrive for Linux product. A feature that I have long wanted to see in IDrive is the ability to use Regular Expressions for exclusion criteria. Most other backup products have this and it is sadly lacking in IDrive. As well, I received many error messages when I CRONed the backup task.
So ... I took the Backup_Script.pl Version 1.3 and did a fair amount of work on it. I would happily like to share this and of course upload it back to IDrive to help the development process of the product. No catches, just trying to be a good client and give back. Credit would be nice ;-)
Anyways, I am not sure how IDrive handles this type of thing, so please contact me if you are interested in my modifications. A summary of fixes and enhancements are as follows:
# $Id: Backup_Script.pl,v 1.5 2014/10/18 21:28:41 alders Exp $
# $Author: alders $
# $Revision: 1.5 $
# $Source: /srv/cvs/IDrive_for_Linux/Backup_Script.pl,v $
# $Log: Backup_Script.pl,v $
# Revision 1.5 2014/10/18 21:28:41 alders
# Minor reformatting of comments to keep things clean.
# Clean source is good source.
#
# Revision 1.4 2014/10/18 21:24:26 alders
# Rewrote subOutputThread and subOutputRoutine to fix a major bug in progress
# reporting. When they attempted to read the TEMPOUTFILE ./output.txt, there
# was no error checking whether the open suceeded or not. In case where the
# open failed, attempts to read the file continued causing error messages on
# STDERR, thus causing CRON to complain. As well the logic was very inefficient
# for parsing and selection. The danger to processing of course was that the
# @fields array was often corrupt with garbage and undefined values.
# It is all working good now. Also related to revision 1.3.
#
# Revision 1.3 2014/10/11 21:16:26 alders
# Put in a fix for convertFileSize. At random, chunks of memory were being
# passed as a parameter instead of a proper numeric filesize. This nullifies
# any bad stuff being passed. I suspect it something to do with threading.
#
# Revision 1.2 2014/10/11 07:40:48 alders
# 1. Exclusion criteria using Regular Expressions
# 2. More information to reports to show parameters
# 3. Perform more extensive parameter error checking
# 4. Include DOT files in backup (easily excluded via regular expression ^.*/\.)
# 5. Report on effectiveness of exclusion criteria
# 6. Eliminate Prototype warnings by using proper function
# call syntax IE. &function( parms );
# 7. Made program both strict and warnings compliant.
# 8. Used PerlTidy -ce -l=80 -i=4 -lp -ctl=1
New Summary Report Sample of the run on my main system (Ubuntu 14.04.1):
Summary :
Total files considered for backup : 53204
Total files backed up : 120
Total files in sync : 53059
Total files failed to backup : 25
Backup End Time : Sun Oct 19 02:12:53 2014
Excluded Directories and Files :
/home/alders/Documents/cdg Excluded: 1 files.
/home/alders/Downloads Excluded: 1 files.
/home/alders/FBooks Excluded: 1 files.
/home/alders/backup Excluded: 1 files.
/home/alders/fontconfig Excluded: 1 files.
/home/alders/tmp Excluded: 1 files.
/home/alders/vmware/shared/Music Excluded: 1 files.
/home/alders/vmware/shared/Pictures Excluded: 1 files.
Exclusion Regular Expressions :
.*vmware.*\.log$ Excluded: 24 files.
.*/\.goutputstream Excluded: 1 files.
.*/\.thunderbird.* Excluded: 263 files.
.*\.vmdk$ Excluded: 39 files.
.*/\.gimp.* Excluded: 13 files.
.*[Tt]rash Excluded: 32 files.
.*/vmware/.*\.tar\.gz$ Excluded: 7 files.
.*/\.gstreamer.* Excluded: 1 files.
.*\.tmp Excluded: 22 files.
.*/[Dd]ownloads/.* Excluded: 113 files.
.*/\.eclipse.* Excluded: 2040 files.
.*\.nvram$ Excluded: 5 files.
.*\.iso$ Excluded: 4 files.
.*\.temp Excluded: 2 files.
.*[Cc]ache Excluded: 25025 files.
.*/[Ee]vals/.* Excluded: 164 files.
.*/\.fontconfig.* Excluded: 0 files.
.*vmmcores.*\.gz$ Excluded: 1 files.
.*/\.mozilla.* Excluded: 51 files.
.*/\.thumbnails.* Excluded: 52 files.
================ERROR REPORT================
Invalid Regular Expression: "*.\.mpeg" - Quantifier follows nothing in regex; marked by <-- HERE in m/* <-- HERE .\.mpeg/
Invalid Regular Expression: "An -invalid regular%expression\" - Trailing \ in regex m/An -invalid regular%expression\/