Wouldn't it be pretty simple to write a short perl program that
compresses the pool.
The necessary subroutines are already there (or almost there) in
Lib.pm.
Notionally, I think you would just need to do the following:
1. Temporarily copy the file contents and make sure to do all the
   following actions on the original inode to preserve all the pc
   links 
2. Write the appropriate first byte (this signals compression
   with/without rsync checksum>
2. Run the zlib compression routine and append after the first byte
3. Append the tail stuff (rsync checksums) though I'm not sure if
   these even exist in the uncompressed pool version.
4. *Move* the link from pool to cpool
5. If there are already files in the cpool then you need to deal with
   possible partial file md5sum collisions. If there is a collision,
   the quick-and-dirty way is just to give it an index one higher than
   the highest existing one in the cpool, though this may lead to
   duplicate content in the chain. Alternatively, to do so this
   correctly you would compare against existing files with the same
   md5sum to see if the data file already exists, if so then you would
   need to find all files in the pc tree that link to the one you are
   moving and relink to the one that exists already. Alternatively,
   you could just do it the quick-and-dirty way and then when you are
   done, run my routine BackupPC_fixLinks once to find all the
   duplicate cpool entries and relink them.

This should be fairly simple to code since again almost all the
required building blocks already exist...

Am I missing anything?

Craig Barratt wrote at about 22:15:02 -0700 on Thursday, October 14, 2010:
 > Tod writes:
 > 
 > > The changelog states that BackupPC_compressPool was removed in
 > > 3.2.0beta0. Is there a replacement for this? I have an uncompressed
 > > pool I would like to convert to compressed.
 > 
 > Unfortunately not.  You can restart BackupPC with compression
 > turned on.  Eventually (when the uncompressed backups expire)
 > the uncompressed pool files will be removed.  But in the meantime
 > you will need more storage since both uncompressed and compressed
 > pool files will be stored.
 > 
 > Craig
 > 
 > ------------------------------------------------------------------------------
 > Download new Adobe(R) Flash(R) Builder(TM) 4
 > The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
 > Flex(R) Builder(TM)) enable the development of rich applications that run
 > across multiple browsers and platforms. Download your free trials today!
 > http://p.sf.net/sfu/adobe-dev2dev
 > _______________________________________________
 > BackupPC-users mailing list
 > BackupPC-users@lists.sourceforge.net
 > List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
 > Wiki:    http://backuppc.wiki.sourceforge.net
 > Project: http://backuppc.sourceforge.net/

------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

Reply via email to