I have someone that is attempting to run backups/restore using an account called db2Maint. As I understand, this is not a root user account which is how they want it. The db2Maint account should only be able to perform basic Netbackup functions such as backups and restores.
For some reason that account can't seem to perform any functions where it concerns backups and restores. They are doing it from an AIX box and using a script, I believe, to run these jobs.
Here's the script she's running, or the part with the user info, I believe.
#
# Initialize the backup command line.
# Customize the number of sessions and buffer options for your environment.
#
#CMD_LINE="db2 BACKUP DATABASE $MY_DB2 ONLINE $MY_SCHED LOAD $MY_LIB BUFFER 1024"
CMD_LINE="db2 backup database $MY_DB2 LOAD $MY_LIB BUFFER 1024"
#CMD_LINE="db2 BACKUP DATABASE $MY_DB2 user db2inst1 using 00hcrap $MY_SCHED OPEN 4 SESSIONS BUFFER 1024"
#CMD_LINE="db2 BACKUP DATABASE $MY_DB2 user db2inst1 using 00hcrap $MY_SCHED BUFFER 1024"
#
# Change MY_USER to the proper DB2 user for performing backups
#
MY_USER=db2maint
#MY_USER=root
echo "Executing: $CMD_LINE"
su - $MY_USER -c "$CMD_LINE"
RETURN_STATUS=$?
# Return 0 for success, non-zero for errors
exit $RETURN_STATUSHere is the log that was generated from on of the job attempts:
16:02:36.010 **WARNING** Locale definition file not found. Using defaults
16:02:36.010 <2> logparams: -sb -rdbms db2 -S brveritas -to 900 -c Angeles7_DB2 -s Default-Application-Backup -clnt Angeles7 -FULL -b Angeles7_1127775755 -jobid 707
16:02:36.015 <4> bphdb main: INF - setenv DB2_POLICY=Angeles7_DB2
16:02:36.015 <4> bphdb main: INF - setenv DB2_SCHED=Default-Application-Backup
16:02:36.015 <4> bphdb main: INF - setenv DB2_SERVER=brveritas
16:02:36.015 <4> bphdb main: INF - setenv DB2_CLIENT=Angeles7
16:02:36.015 <4> bphdb main: INF - setenv DB2_FULL=1
16:02:36.015 <4> bphdb main: INF - setenv DB2_INCR=0
16:02:36.015 <4> bphdb main: INF - setenv DB2_CINC=0
16:02:36.015 <4> bphdb main: INF - setenv DB2_USER_INITIATED=0
16:02:36.015 <4> bphdb main: INF - setenv DB2_SCHEDULED=1
16:02:36.015 <4> bphdb sync_server: INF - BACKUP START
16:02:36.153 <4> bphdb sync_server: INF - CONTINUE BACKUP message received.
16:02:36.154 <2> bphdb get_filelist: INF - Read filename:
16:02:36.154 <2> bphdb get_filelist: INF - Read filename:
16:02:36.154 <4> bphdb do_backup: INF - Processing /usr/openv/netbackup/ext/db_ext/db2/scripts/ng_full_online_backup
16:02:36.155 <4> bphdb keepalive_timeout: INF - bphdb still working.
16:02:36.155 <2> bphdb keepalive_timeout: INF - bphdb- Sending a keepalive.
16:02:36.155 <4> bphdb do_backup: INF - Keepalives will be sent every 450 seconds.
16:02:36.155 <4> bphdb do_backup: INF - Waiting for the child status.
16:02:36.165 <4> bphdb do_backup: INF - Child executing /usr/openv/netbackup/ext/db_ext/db2/scripts/ng_full_online_backup
16:02:37.680 <16> bphdb do_backup: ERR - Script exited with status = 4
16:02:37.692 <16> bphdb Exit: ERR - bphdb exit status = 6: the backup failed to back up the requested files
16:02:37.693 <4> bphdb Exit: INF - EXIT STATUS 6: the backup failed to back up the requested files
16:02:40.314 **WARNING** Locale definition file not found. Using defaults
16:02:40.314 <2> logparams: -sb -rdbms db2 -S brveritas -to 900 -c Angeles7_DB2 -s Default-Application-Backup -clnt Angeles7 -FULL -b Angeles7_1127775759 -jobid 707
16:02:40.315 <4> bphdb main: INF - setenv DB2_POLICY=Angeles7_DB2
16:02:40.315 <4> bphdb main: INF - setenv DB2_SCHED=Default-Application-Backup
16:02:40.315 <4> bphdb main: INF - setenv DB2_SERVER=brveritas
16:02:40.315 <4> bphdb main: INF - setenv DB2_CLIENT=Angeles7
16:02:40.315 <4> bphdb main: INF - setenv DB2_FULL=1
16:02:40.315 <4> bphdb main: INF - setenv DB2_INCR=0
16:02:40.315 <4> bphdb main: INF - setenv DB2_CINC=0
16:02:40.315 <4> bphdb main: INF - setenv DB2_USER_INITIATED=0
16:02:40.315 <4> bphdb main: INF - setenv DB2_SCHEDULED=1
16:02:40.315 <4> bphdb sync_server: INF - BACKUP START
16:02:40.528 <4> bphdb sync_server: INF - CONTINUE BACKUP message received.
16:02:40.528 <2> bphdb get_filelist: INF - Read filename:
16:02:40.529 <2> bphdb get_filelist: INF - Read filename:
16:02:40.529 <4> bphdb do_backup: INF - Processing /usr/openv/netbackup/ext/db_ext/db2/scripts/ng_full_online_backup
16:02:40.529 <4> bphdb keepalive_timeout: INF - bphdb still working.
16:02:40.529 <2> bphdb keepalive_timeout: INF - bphdb- Sending a keepalive.
16:02:40.529 <4> bphdb do_backup: INF - Keepalives will be sent every 450 seconds.
16:02:40.529 <4> bphdb do_backup: INF - Waiting for the child status.
16:02:40.529 <4> bphdb do_backup: INF - Child executing /usr/openv/netbackup/ext/db_ext/db2/scripts/ng_full_online_backup
16:02:41.966 <16> bphdb do_backup: ERR - Script exited with status = 4
16:02:41.966 <16> bphdb Exit: ERR - bphdb exit status = 6: the backup failed to back up the requested files
16:02:41.966 <4> bphdb Exit: INF - EXIT STATUS 6: the backup failed to back up the requested filesit would seem to me, from this log, that there is a file or something missing, rather than a permissions issue. But I'm just not sure why the root user account works and not the non root account. Any pointers would be well received. Thanks.