Davorin:
I do not know if Eric received a resolution to his issue, but, I have clients with similar issues that are using PSM. In those cases I use onpsm to clean up older archive and logical log files:
date=<oldest date to keep>
paws=<seconds to sleep between runs>
for oid in $( onpsm -O list|awk -v dt=$date '/^[0-9]/{if ($2 < dt) {print $1;} else {exit 0;}}' ); do
echo "onpsm -O del -y -o $oid";
onpsm -O del -y -o $oid;
cnt=$(( cnt + 1 ))
if [[ $(( cnt % 100 )) -eq 0 ]]; then echo "sleeping($paws)"; sleep $paws; echo continuing; cnt=0; fi
done
The awk script returns the object ids for any PSM objects older than the value in the "date" environment variable. The sleep setting in the "paws" variable is to prevent the cleanup from locking the PSM catalog while a logical log backup is trying to kick off.
Witness:
$ > onpsm -O list
OneDB Primary Storage Manager Objects List
Object ID Date Created Size (MB) Version Name
1 2023-08-28T14:44:42 88.2 1 /elendil/rootdbs/0
2 2023-08-28T14:44:42 59.4 1 /elendil/cdrspace/0
3 2023-08-28T14:44:43 1369.9 1 /elendil/datadbs_2/0
4 2023-08-28T14:44:46 0.1 1 /elendil/rubble/0
5 2023-08-28T14:44:47 0.1 1 /elendil/flintstone/0
6 2023-08-28T14:44:48 0.1 1 /elendil/llogspace/0
7 2023-08-28T14:44:49 179.5 1 /elendil/sbspace/0
8 2023-08-28T14:44:50 61.0 1 /elendil/indexdbs/0
9 2023-08-28T14:44:50 12790.8 1 /elendil/dbs_16k/0
10 2023-08-28T14:44:51 5545.7 1 /elendil/datadbs_1/0
11 2023-08-28T14:44:51 0.1 1 /elendil/plogspace/0
12 2023-08-28T14:44:52 561.3 1 /elendil/indexdbs_1/0
13 2023-08-28T14:46:00 6.0 1 /elendil/1/3578
14 2023-08-28T14:46:01 0.1 1 /elendil/critical_files/ixbar
15 2023-08-28T14:46:01 0.1 1 /elendil/critical_files/oncfg
16 2023-08-28T14:46:01 0.1 1 /elendil/critical_files/onconfig
17 2023-08-28T14:46:01 0.1 1 /elendil/critical_files/sqlhosts
18 2023-09-14T10:37:19 90.0 2 /elendil/rootdbs/0
19 2023-09-14T10:37:20 24387.0 2 /elendil/datadbs_1/0
20 2023-09-14T10:37:21 1369.9 2 /elendil/datadbs_2/0
...
$ > date=2023-09-13
informix@Elezar-II:~$ onpsm -O list|awk -v dt=$date '/^[0-9]/{if ($2 < dt) {print $1;} else {exit 0;}}'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
$ >
Notice that items 18, 19 & 20 (and those that came after, are not listed.
Art
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com------------------------------
Original Message:
Sent: Mon September 25, 2023 04:58 AM
From: Davorin Kremenjas
Subject: onsmsync used to recycle backups : how effective is it?
Hi Eric,
did you ever manage to resolve this with Informix Support? I'm having exactly the same problem with PSM+onsmync (configured via Informix HQ) on 14.10.xC8.
Thanks
------------------------------
Davorin Kremenjas
Original Message:
Sent: Tue June 20, 2023 12:54 PM
From: Eric Vercelletto
Subject: onsmsync used to recycle backups : how effective is it?
Hi Folks,
I have been installing PSM at my customers and deployed SPL controlled by the IFMX scheduler.
I have been testing onsmsync with different options to clear the backup objects.
The options I use are
- -t "datetime"
- -I number of days
- -g generations number to retain
I am doing fine with the syntax and I can see onsmsync does things, but the results I expect are not achieved
What do I expect when I run onsmsync one of those options?
- Backup objects complying with the conditions disappear from the list rendered by onpsm -O list AND
- Backup files complying with the conditions are physically erased from the file system
- Ixbar file updated accordingly
I also understood that using onsmsync to recycle backup medias also ensures not to delete objects necessary to perform a restore (like for instance deleting a level 0 backup needed by a level 1 backup, or stuff like this)
What I have noticed with my tests is that, at different opportunities, I have warning messages in the bac_act log file that say for instance backup object complying with conditions but not deleted (for an unknown reason). For me those files should clearly be deleted, and they are not.
At the end, I remain with a lot of backup media/objects that should have been deleted long ago, but are still present in the onpsm -O list and file systems.
Did I misunderstand anything critical here?
This is IFMX 14.10 FC(5 or 6) I think
Thanks
Eric
Eric Vercelletto
Data Management Architect and Owner / Begooden IT Consulting
KandooERP Founder and CTO
IBM Champion 2013,2014,2015,2016,2017,2018,2019,2020
Tel: +33(0) 298 51 3210
Mob : +33(0)626 52 50 68
skype: begooden-it
Google Hangout: eric.vercelletto@begooden-it.com
Email: eric.vercelletto@begooden-it.com
www : http://www.vercelletto.com
www https://kandooerp.org