[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-tar] filelists created dynamically from metalanguage descriptions

From: Micha
Subject: [Bug-tar] filelists created dynamically from metalanguage descriptions
Date: Sat, 16 Jul 2005 21:30:19 +0200
User-agent: Das Alpenjodeln


I'm offllist, please CC me.

i just read something about software patent defense through prior art, 
[ http://swpat.ffii.org/analysis/shield ]
and that drew me to the idea i should moreoften communicate my ideas.

First of all, i'm no developper, just a layman, using debian linux and 
frequently hacking shellscripts.
Second, i don't believe i'll tell you something new here; and i'm sure you will 
tell me how recent archivers (which i didn't try a single one yet) do exactly 
anything much better, but anyway, perhaps you find it at least a little 
entertaining to see how people come to the same solutions, but through 
different means.
2 years before i realized that i don't want to backup simply whole discs or 
partitions, so i fiddled out how to archive selections. I looked for a 
'meta-language' to describe what kind of files form which directories should be 
searched, or omitted. Since i'm only knowing the GNU bash it was a rather easy 
choice...:). The simple idea of the outcome, the 'packup' script, is:

You choose a 'selection' title (say, 'system' or 'users') which will *source* a 
related file which contains shell-commands which create proper file pathes 
(using the available filesystem tools like 'find'). This sourced file puts 
anything on stdout, so it can as well be seen as a function of the 'title' 
name. The output will be processed then in the regular archiving manner.

My implementation is designed for tar, eg using the '--exclude-from' feature: 
Thus, the 'dynamic filelist' thing is just done twice, for the pathes to backup 
and once more for the pathes to exclude.
It has some few options and features, like tuning the feedback output, include 
mounting of partitions in the selection file, and specifying several selections 
at once. It's designed for commandline or cronjobs.

I never had reason to extend it to anything more than a simple 'total' backup. 

Now if i had to tell what's the good idea behind it, i'd say using a 
metalanguage to describe pathes after search criteria like content, type, date, 
size, owner, plus/or relation to other files (eg comparing to prior backups).
Just anything you can express through a program.
The actual backup list will then be created only when the program is invoked, 
according to the actual state of the the stored data in the filesystem. Of 
course you can use any other programming language or something else that can be 
interpreted. In fact it's just about translating metalanguage descriptions into 
the clumsy (but exact) inflexible structure of a filesystem.

The next obvious step would be to create a second more simple 'metalanguage' 
(maybe with graphical symbols or menu-like items which can be manipulated via a 
pointer or even spoken words) to enable user to put together a new selection 
without knowing any difficult program language systax.

I'll attach you the script, more exactly, a directory with a my personal 
configurations and stuff, especially a setup- and a usage-Readme. It works on a 
Debian with GNU Bash, but should do on any GNU/Linux. 


Michael Woerdehoff, Freiburg, Germany


ps. For my first time, I had to insert a license header.  If nothing else, it 
was at least a good exercise :)
Please tell me if i can do this stuff in a better way next time. Also, what 
would you say, is writing to this mailing list enough to place an idea into the 
public domain ? (I hope it's archived)


Attachment: packup.tar.bz2
Description: Binary data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]