Re: [Dar-support] Misunderstanding of dar -I option
For full, incremental, compressed and encrypted backups or archives
Brought to you by:
edrusb
From: <dar...@ca...> - 2009-12-06 11:56:26
|
Hello Denis :-) I am sorry -- still haven't "got" how to do even the simplest of restores using dar (and this is a matter of concern). What is wrong with this command (it restores the directories but not the file)? dar -x home --no-overwrite --alter=mask -X '*' -X '.*' \ -g 'Shell Folders/Application Data/Microsoft/Outlook/Outlook.pst' The output is: -------------------------------------------- 4 inode(s) restored 0 inode(s) not restored (not saved in archive) 88 inode(s) ignored (excluded by filters) 0 inode(s) less recent than the one on filesystem 0 inode(s) failed to restore (filesystem error) 0 inode(s) deleted -------------------------------------------- Total number of inodes considered: 92 -------------------------------------------- EA restored for 0 inode(s) -------------------------------------------- The file is in the archive (which has been verified using par2) as shown by: dar -l home | grep Outlook.pst [Saved] [ 35%] -rwxr--r-- c 1000 455099392 Sat Dec 5 21:57:59 2009 Shell Folders/Application Data/Microsoft/Outlook/Outlook.pst Best Charles -----Original Message----- From: Denis Corbin [mailto:dar...@fr...] Sent: 30 July 2009 01:28 To: need help compiling or using dar ? This mailing list is for you. Subject: Re: [Dar-support] Misunderstanding of dar -I option -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 dar...@ca... a écrit : > > Sorry Denis :-) > > That was wrong -- as another reading of the dar man page showed. I now > understand that: > > * The prune option -P is used to exclude directories _and files_. It can be > given glob(7) expressions. Yes, absolutely. > > * The "go into" option -g is used to do an implicit "-P * -P .*" and then > unprune nominated directories and files. It cannot be given glob(7) > expressions. No, it can. For example, you can skip all .mozilla/cache directories found under any home directory using -R / -P "home/*/.mozilla/cache" or if you prefer -R / -ar -P "home/.*/\.mozilla/cache" > > I hope I am alone in finding the function and interaction of the -g, -I, -X > and -P options bewildering. I got off to a bad start by taking -P as > similar to the find command's -prune option and failing to realise that the > mask on -X is a filename global expansion so leading "."s need to be > explicitly matched. > > Thinking out loud ... No problem. You can also take a look at -[ and -] options. They are equivalent to -P / -g options, at the difference that they point to a file that contains a list of entry. Each entry is static (no glob/regex expression) and it must contain the full, absolute path (including the root directory pointed to by -R option). > > This may be a serious point; restorations are seldom well enough practiced > and are often done under pressure at the end of a long working time. For a > restore utility, "intuitively obvious" is important. > > Would it be possible to have only two file selection options: a -X option > that excluded all files and directories matched and a -I that included all > files and directories matched, the two to work cumulatively? -X and -I > could be made to apply to directories by ending the mask with /; if the mask > ended with any other character it would be taken as a file mask. That would > be intuitively obvious (to me, anyway!). I think you should consider -am option and the way it changes the masking behavior, things may becomes a bit more simple and powerful at the same time: For example, You want to avoid backing up any file ending with "~" except if it ends with "txt~" but you still want to exclude file starting with "trash" even if they finish by "txt~". With -am you just follow the order in which you speak, this gives: -am -X "*~" -I "*txt~" -X "trash*" Without -am option, this statement would include any "*txt~" file that do not match "*~" nor "trash*", thus you would have no file at all, as any file matching "*txt~" also match "*~". Without -am the order of -X and -I has no importance. Where from the name "ordered" mask for -am option. > > Then there would be no need for the -g. After -X '*/' to exclude > everything, -I options would have the same functionality as the present -g > (this would require that -X '*/' also matched the root). > > There would be no need for -P. The proposed -X does all that -P currently > does (-X '*/<expression>' would replace the current -X '<expression>'). > > Best > > Charles > Regards, Denis. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFKcKnPpC5CI8gYGlIRAj2/AJ4rfgH6H1TZu44VYJJilaDctp+fmACeKI3c dpO4IALYZp5gdYSDzv9/DTs= =Ubjx -----END PGP SIGNATURE----- ---------------------------------------------------------------------------- -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Dar-support mailing list Dar...@li... https://lists.sourceforge.net/lists/listinfo/dar-support |