New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quantity cleanup for gzip/bzip2 #156

Closed
lushndm opened this Issue Sep 13, 2018 · 8 comments

Comments

Projects
None yet
2 participants
@lushndm

lushndm commented Sep 13, 2018

When I setup cleanup by quantity it's not work for target with compress. Backups are not deleted.
After turning off compress
cleanup by quantity working good.
What can I do?

@sebastianfeldmann

This comment has been minimized.

Show comment
Hide comment
@sebastianfeldmann

sebastianfeldmann Sep 13, 2018

Owner

Could you Share your config without any passwords or other secret data.
I'm curious about the compression and encryption you are using and the cleanup configuration in particular

I'll try to reproduce this tomorrow morning

Owner

sebastianfeldmann commented Sep 13, 2018

Could you Share your config without any passwords or other secret data.
I'm curious about the compression and encryption you are using and the cleanup configuration in particular

I'll try to reproduce this tomorrow morning

@lushndm

This comment has been minimized.

Show comment
Hide comment
@lushndm

lushndm Sep 19, 2018

<phpbu xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:noNamespaceSchemaLocation="http://schema.phpbu.de/5.0/phpbu.xsd">
  <backups>
    <backup name="xtra">
      <!-- create a json logfile -->
      <log type="json" target="/home/appuser/mybackups/log-xtrabackup.json"/>

      <adapter type="env" name="myEnv"></adapter>

      <!-- source xtrabackup -->
      <source type="xtrabackup">
        <option name="user" value="***" />
        <option name="password" value="***" />
      </source>

      <target dirname="/backups/mysql-xtra"
              filename="xtra-%Y%m%d-%H%i"
              compress="gzip"/>

      <!-- cleanup quantity: keep the last 3 backups -->
      <cleanup type="quantity">
        <option name="amount" value="3"/>
      </cleanup>

    </backup>
  </backups>
</phpbu>

lushndm commented Sep 19, 2018

<phpbu xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:noNamespaceSchemaLocation="http://schema.phpbu.de/5.0/phpbu.xsd">
  <backups>
    <backup name="xtra">
      <!-- create a json logfile -->
      <log type="json" target="/home/appuser/mybackups/log-xtrabackup.json"/>

      <adapter type="env" name="myEnv"></adapter>

      <!-- source xtrabackup -->
      <source type="xtrabackup">
        <option name="user" value="***" />
        <option name="password" value="***" />
      </source>

      <target dirname="/backups/mysql-xtra"
              filename="xtra-%Y%m%d-%H%i"
              compress="gzip"/>

      <!-- cleanup quantity: keep the last 3 backups -->
      <cleanup type="quantity">
        <option name="amount" value="3"/>
      </cleanup>

    </backup>
  </backups>
</phpbu>
@lushndm

This comment has been minimized.

Show comment
Hide comment
@lushndm

lushndm Sep 19, 2018

compress="gzip"

Same case for compress="bzip2"

lushndm commented Sep 19, 2018

compress="gzip"

Same case for compress="bzip2"

@sebastianfeldmann

This comment has been minimized.

Show comment
Hide comment
@sebastianfeldmann

sebastianfeldmann Sep 19, 2018

Owner

what kind of source are you using?
forget it just saw your config posting 🙈

Owner

sebastianfeldmann commented Sep 19, 2018

what kind of source are you using?
forget it just saw your config posting 🙈

@lushndm

This comment has been minimized.

Show comment
Hide comment
@lushndm

lushndm Sep 24, 2018

Any news?

lushndm commented Sep 24, 2018

Any news?

sebastianfeldmann added a commit that referenced this issue Sep 24, 2018

Fix target timing issue #156
In cases where sources create a directory and phpbu has to compress the
directory with tar first phpbu will add a '.tar' suffix to the target.

The regex to collect all backups for cleanup was created before all
suffixes where set correctly. This resulted in not working cleanups.

The issue is fixed by creating the regex right before all backups
are collected.
@sebastianfeldmann

This comment has been minimized.

Show comment
Hide comment
@sebastianfeldmann

sebastianfeldmann Sep 24, 2018

Owner

Sorry, last days where a bit busy ;)

I found the issue and I will release a bugfix version asap.

Owner

sebastianfeldmann commented Sep 24, 2018

Sorry, last days where a bit busy ;)

I found the issue and I will release a bugfix version asap.

@sebastianfeldmann

This comment has been minimized.

Show comment
Hide comment
@sebastianfeldmann

sebastianfeldmann Sep 24, 2018

Owner

I just released version 5.1.3 including a fix for this issue

Owner

sebastianfeldmann commented Sep 24, 2018

I just released version 5.1.3 including a fix for this issue

@sebastianfeldmann

This comment has been minimized.

Show comment
Hide comment
@sebastianfeldmann

sebastianfeldmann Sep 24, 2018

Owner

Thanks for reporting this issue and for your patience.

Owner

sebastianfeldmann commented Sep 24, 2018

Thanks for reporting this issue and for your patience.

@sebastianfeldmann sebastianfeldmann self-assigned this Sep 24, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment