backdrop-contrib / backup_migrate

Port of the Drupal backup_migrate module to Backdrop
GNU General Public License v2.0
7 stars 14 forks source link

Incorrect backup_migrate_smart_keep_weekly value #46

Closed opi closed 2 years ago

opi commented 5 years ago

From https://github.com/backdrop-contrib/backup_migrate/blob/1ab61612b43d0a4a5b92e43d1a9a4657f46b7876/config/backup_migrate.settings.json#L30

"backup_migrate_smart_keep_weekly": 2147483647,

I guess this should be something like 4... but it seems to be intentional https://github.com/backdrop-contrib/backup_migrate/commit/1ab61612b43d0a4a5b92e43d1a9a4657f46b7876#diff-65910faaf5871d4388da6c06cd01d8a1

can you explain this value ?

Radcliffe commented 5 years ago

This value is 2^31 - 1, which is the largest 32-bit signed integer. I suppose it means that all weekly backups should be kept. The previous value was 2^63 - 1, the largest 64-bit signed integer.

quackers8me commented 5 years ago

Yes, the default is to keep all weekly backups. The original Drupal module used this as a setting:

define('BACKUP_MIGRATE_SMART_KEEP_WEEKLY', PHP_INT_MAX);

But that constant couldn't be added to the BD settings.json so I hardcoded the largest 32 bit integer.

On Wed, Jan 9, 2019 at 9:32 AM David Radcliffe notifications@github.com wrote:

This value is 2^31 - 1, which is the largest 32-bit signed integer. I suppose it means that all weekly backups should be kept. The previous value was 2^63 - 1, the largest 64-bit signed integer.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/backdrop-contrib/backup_migrate/issues/46#issuecomment-452778373, or mute the thread https://github.com/notifications/unsubscribe-auth/AKFOz5esQP-nuRapczUJoxSN_bH7wWkkks5vBieggaJpZM4Z3uGi .

opi commented 5 years ago

is it really relevant to keep every weekly backup ?

( Backdrop is a grown boy now, and could emancipate from Drupal oddities :p )

Wylbur commented 4 years ago

I just ran across this error. By selecting smart backups, it seems you will eventually run out of space for backups.

Perhaps a better scheme would be

That would make a finite set of backups.

The current value of weeks is pretty silly.