Directory masks -- howto?
Johnathan Burchill <[email protected]>
| Newsgroups | gmane.comp.sysutils.backup.dar.general |
|---|---|
| Organization | Department of Physics and Astronomy, University of Calgary |
| Message-ID | <[email protected]> |
Hi Denis, My KDE gui frontend is almost ready for initial release. Masks are giving me a problem though. This is the "-P" option to dar which I am trying to implement in the gui. Here is the synopsis: Suppose I want to exclude a directory which contains the backup archive exdir="/home/john/kdar/backups"; from an archive whose root is rootdir="/home/john/kdar/"; I construct the subtree mask: et_mask subtree; Then I construct an exclusion mask: ou_mask exclus; Then with the add_mask() method, exclus.add_mask(simple_mask(exdir)); And then add exclus to the subtree: subtree.add_mask(not_mask(exclus)); libdar then warns (from op_create) that the backup archive is in one of the directories that will be backed up, and an infinite loop might result! It works fine when I have two "-P" type arguments: exdir1="/home/john/kdar/backups" exdir2="/home/john/kdar/backups/*" exclus.add_mask(simple_mask(exdir1)); exclus.add_mask(simple_mask(exdir2)); The command line version of libdar does not require me to have both "-P" arguments for the backup to be excluded, I just need "-P backups". How do I make it as simple using libdar directly? Thanks, JB P.S. some screenshots of KDar can be found at http://www.phys.ucalgary.ca/~burchill/KDAR/index.html Any suggestions? -- Johnathan K. Burchill, Ph.D. Department of Physics and Astronomy University of Calgary 2500 University Drive N.W. Calgary, AB T2N 1N4 Canada (403) 217-4286 [email protected] ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php