3 Replies Latest reply on Jan 12, 2016 6:41 AM by hchiorean

    ModeShape Backup doesn't compress binaries

    pinpin

      Hi,

      I have some problem with ModeShape backups which are bigger than original cacheStore (I use LevelDB cacheStore). I use compress option to do my backups.

      But in BackupService class, I have found that binaries are not compressed. Is this normal ?

       

      With big repository (10 Go for example), I need a disk with twice free space (20 Go) to be able to backup repository. It would be a futur problem with growing repository.

       

      Thanks

        • 1. Re: ModeShape Backup doesn't compress binaries
          hchiorean

          I have some problem with ModeShape backups which are bigger than original cacheStore (I use LevelDB cacheStore). I use compress option to do my backups.

          But in BackupService class, I have found that binaries are not compressed. Is this normal ?

          Binaries are/were never compressed since gzipping non-text data doesn't make any sense. Only the repository contents (i.e. the JSON documents) are compressed when you use the "compress" option which is "true" by default.

          If you perform a default backup, the total size of the backup is "repository size" + "binary data size", where binaries are stored outside the repository, so yes, if you have at least 1 binary the overall size will be greater than just the repository size.

           

          When performing a repository backup, you always have the option of not backing up the binary data (https://docs.jboss.org/author/display/MODE40/Backup+and+restore#Backupandrestore-Advancedbackup%26restoreconfigurationoptions - available since 4.3.0).

          If you have lots of binaries, this actually makes sense because:

          a) binaries are stored outside of the repository and just linked/referenced by nodes

          b) the place where binaries are stored may very well have its own superior backup mechanism (e.g. DB backup)

          • 2. Re: ModeShape Backup doesn't compress binaries
            pinpin

            Ok Thanks. I understand.

            But in my case, my repository stores many files with a part of text files. The compression would be interresting on text files (xml, txt, etc...).

            I made a patch on BackupService class to compress files and the backup become 20% smaller.

             

            I store binaries in LevelDB cacheStore and backup are local.

            • 3. Re: ModeShape Backup doesn't compress binaries
              hchiorean

              I guess that makes sense, if you're storing lots of binaries as text files.

              Feel free to log an enhancement and we'll investigate if we can add this for 4.6.0.Final. Also, if you'd like to contribute your patch we're happy to look & integrate any submitted changes.