[Spce-user] Acc Cleanup - Cannot Update partitions for table=cdr the gap is too large
Hohl Matthias
matthias.hohl at telematica.at
Mon Aug 26 18:40:55 EDT 2019
This did it:
> use accounting;
> select count(*) from cdr where start_time < UNIX_TIMESTAMP('2019/01/01')
> create table cdr_backup_until_20181231 like cdr;
> insert into cdr_backup_until_20181231 select * from cdr where start_time < UNIX_TIMESTAMP('2019/01/01');
> select count(*) from cdr_backup_until_20181231;
> delete from cdr where start_time < UNIX_TIMESTAMP('2019/01/01');
Von: Spce-user <spce-user-bounces at lists.sipwise.com> Im Auftrag von Hohl Matthias
Gesendet: Montag, 26. August 2019 18:21
An: 'Rene Krenn' <rkrenn at sipwise.com>; 'Spce-user' <Spce-user at lists.sipwise.com>
Betreff: Re: [Spce-user] Acc Cleanup - Cannot Update partitions for table=cdr the gap is too large
Hello Rene,
yah… i think last time the script was ruinning was before the upgrade from 4.5.5 to 5.5.2 on January 2018. There was my last backup.
Hmm ok I will try this.. thanks.
Von: Rene Krenn <rkrenn at sipwise.com <mailto:rkrenn at sipwise.com> >
Gesendet: Montag, 26. August 2019 18:15
An: 'Hohl Matthias' <matthias.hohl at telematica.at <mailto:matthias.hohl at telematica.at> >; 'Spce-user' <Spce-user at lists.sipwise.com <mailto:Spce-user at lists.sipwise.com> >
Betreff: AW: [Spce-user] Acc Cleanup - Cannot Update partitions for table=cdr the gap is too large
Seems your cleanup was not running for long time, not just since the upgrade.
Move out all cdrs (and accompanying tables that have a cdr_start_time column) older than 24 months into separate tables.
1.create table accounting.xy_old like accounting.xy;
2.insert into accounting.xy_old select from accounting.xy where start_time < unix_timestamp(now() - interval ..
3.delete from accounting.xy where start_time < unix_timestamp(now() - interval ..
br
Von: Spce-user [mailto:spce-user-bounces at lists.sipwise.com] Im Auftrag von Hohl Matthias
Gesendet: Montag, 26. August 2019 17:42
An: 'Spce-user' <Spce-user at lists.sipwise.com <mailto:Spce-user at lists.sipwise.com> >
Betreff: [Spce-user] Acc Cleanup - Cannot Update partitions for table=cdr the gap is too large
Hello,
After fixing the cleanup script manually (thanks to the hint from Henk Plessius) I have a new error now:
root at spce:~# /usr/sbin/acc-cleanup.pl
ERROR error: Cannot update partitions for table=cdr,the gap between min/max record is too large (more than 24 months). at /usr/share/perl5/NGCP/Cleanup.pm line 361.
How can I solve this?
Mit freundlichen Grüßen,
Matthias Hohl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20190827/b328eb23/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5585 bytes
Desc: not available
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20190827/b328eb23/attachment-0002.p7s>
More information about the Spce-user
mailing list