[CS-FSLUG] Question: Working With Compressed Files in Brash
Tim Young
Tim.Young at LightSys.org
Mon Apr 23 14:54:03 CDT 2012
Hi,
After a brief bit of pondering, I would go with the tar/bzip option.
tar, in this case, not using incremental backup mode, but a
different tar file for each time you run it.
The main benefit, besides being compressed, is that it deals with
issues concerning duplicate names. If I make a file /delete/me.txt,
and I proceed to delete it. I then decide I really wanted that, so I
make it again. This time, my wife deletes it. After the third time,
I decide I really wanted the first version of the file. If the files
are all in bundled tar-files, it is simple to restore any particular
one. Of course, you will have an issue if you want to select which
file you want to restore, when there are three of them with the same
name. :)
The down-side to this is that it becomes a little harder to remove
individual files from the trash. If I delete a directory, and notice
it all went into the brash, but realize one of those files I wanted
totally deleted, what do I do? Tar does have the --delete option, so
you can remove the file from the brash. This is possible, just can
be a bit more complex. But then again, complexity is what
command-line-parameters are for... :)
Besides tar, one could go with something as complex as duplicity.
(duplicity could add some added niftyness to it, such as encrypted
garbage) But I doubt that sort of thing would be at all
advantageous. ;) Tar is on virtually any box. If you wanted a
truly awesome system, you could test to see if bzip functionality was
there (not all systems support bzip) and fall back to plain-old gzip
/ plaintext if not.
- Tim Young
On 4/23/2012 2:14 PM, Don Parris wrote:
> Hi all,
>
> In my "Brash" shell script, I want to compress the files into an
> archive to save space. What I am curious about is the best
> approach to this. I see at least 2 options:
> <> compress each file or set of files at the time the user tosses
> them into the trash (1 compressed archive for each time files are
> tossed)
> <> create an archive on the initial toss action, and append future
> files to the one archive
>
> From a "safety" standpoint, it seems best to create a new archive
> for each time the user tosses files into the trash:
> <> Don't put all the eggs in one basket - if one archive is somehow
> lost, the remaining archives should remain (apart from the user
> emptying the trash)
> <> Avoids one monolithic archive
>
> Ok, nothing prevents the files being deleted when the user empties
> the trash. They *will* be gone, recoverable only by forensics
> tools. Even so, I lost a lot of data once when I created a
> monolithic archive and copied to a CD-ROM. When I later tried to
> open it, gzip basically just churned away - never actually opening
> my files. I had help from various lists (I think this one
> included) and still never recovered my files. I have not forgotten
> that.
>
> Anyway, just curious as to whether anyone else sees something I
> should think about. I am considering combining tar and bzip. Tar
> will let one view a list of files in an archive - something that
> will be useful when the user wants to see what is in the trash.
>
> Thoughts?
> Don
> --
> D.C. Parris, FMP, ESL Certificate
> Minister, Security/FM Coordinator, Free Software Advocate
> https://www.xing.com/profile/Don_Parris |
> http://www.linkedin.com/in/dcparris
> GPG Key ID: F5E179BE
>
>
>
> _______________________________________________
> ChristianSource FSLUG mailing list
> Christiansource at ofb.biz
> http://cs.uninetsolutions.com
More information about the Christiansource
mailing list