This is a discussion on newbie: backing up archived logs within the DB2 forums, part of the Database Server Software category; --> We have a procedure to backup archived logs and then purge them. The backup product we use is Syncsort's ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| We have a procedure to backup archived logs and then purge them. The backup product we use is Syncsort's Backup Express 2.1.5. We use a user exit (db2uext2) to copy logs to the archive directory. The backup procedure is essentially 1. force current log to be archived 2. Backup the archive directory 3. run "rm *" to purge the logs I have concern that there is the possibility of a log being generated after step 2 begins, not being backed up, and then being deleted by step 3. Is my convern valid? One other question while I'm at it. What happens if the disk where the archive directory fills up and db2 needs to archive another file? Will the db hang? -- Chuck Remove "_nospam" to reply by email |
| |||
| Chuck wrote: > We have a procedure to backup archived logs and then purge them. The > backup product we use is Syncsort's Backup Express 2.1.5. We use a user > exit (db2uext2) to copy logs to the archive directory. The backup > procedure is essentially > > 1. force current log to be archived > 2. Backup the archive directory > 3. run "rm *" to purge the logs > > I have concern that there is the possibility of a log being generated > after step 2 begins, not being backed up, and then being deleted by step > 3. Is my convern valid? This is definitely a valid concern, and it depends on how the backup tool works -- i.e., it probably builds a list of files to back up when it starts, so any files created after this get skipped. It's safer to remove files that have not been modified for 1 day, but only if your backup is successful. > One other question while I'm at it. What happens if the disk where the > archive directory fills up and db2 needs to archive another file? Will > the db hang? No, the user exit will fail and the files will remain in the active log path. DB2 will have the retry the operation every 5 minutes. If the filesystem holding the active log path fills, things are different- this is controlled by the database configuration parameter BLK_LOG_DSK_FUL. See: http://tinyurl.com/2mbez for more info. -----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World! -----== Over 100,000 Newsgroups - 19 Different Servers! =----- |
| |||
| Ian <ianbjor@mobileaudio.com> wrote in news:40ac46fe_1@corp.newsgroups.com: > Chuck wrote: > >> We have a procedure to backup archived logs and then purge them. The >> backup product we use is Syncsort's Backup Express 2.1.5. We use a >> user exit (db2uext2) to copy logs to the archive directory. The >> backup procedure is essentially >> >> 1. force current log to be archived >> 2. Backup the archive directory >> 3. run "rm *" to purge the logs >> >> I have concern that there is the possibility of a log being generated >> after step 2 begins, not being backed up, and then being deleted by >> step 3. Is my convern valid? > > This is definitely a valid concern, and it depends on how the backup > tool works -- i.e., it probably builds a list of files to back up > when it starts, so any files created after this get skipped. > > It's safer to remove files that have not been modified for 1 day, but > only if your backup is successful. > >> One other question while I'm at it. What happens if the disk where >> the archive directory fills up and db2 needs to archive another file? >> Will the db hang? > > No, the user exit will fail and the files will remain in the active > log path. DB2 will have the retry the operation every 5 minutes. > > If the filesystem holding the active log path fills, things are > different- this is controlled by the database configuration parameter > BLK_LOG_DSK_FUL. See: http://tinyurl.com/2mbez for more info. > > > > > -----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- > http://www.newsfeeds.com - The #1 Newsgroup Service in the World! > -----== Over 100,000 Newsgroups - 19 Different Servers! =----- > Thanks. On the archived log backup I decided to take a snapshot of the files in that directory immediately prior to backing it up. ls -1 $ARCHIVE_DIR/*.LOG > $ARCHIVE_DIR/files_to_delete When the backup finishes I only remove the files captured by the snapshot. xargs rm < $ARCHIVE_DIR/files_to_delete -- Chuck Remove "_nospam" to reply by email |
| ||||
| Chuck <chuckh_nospam@softhome.net> wrote in message news:<Xns94EFA5C58D5Echuckhsofthomenet@130.133.1.4 >... > Ian <ianbjor@mobileaudio.com> wrote in > news:40ac46fe_1@corp.newsgroups.com: > > > Chuck wrote: > > > >> We have a procedure to backup archived logs and then purge them. The > >> backup product we use is Syncsort's Backup Express 2.1.5. We use a > >> user exit (db2uext2) to copy logs to the archive directory. The > >> backup procedure is essentially > >> > >> 1. force current log to be archived > >> 2. Backup the archive directory > >> 3. run "rm *" to purge the logs > >> > >> I have concern that there is the possibility of a log being generated > >> after step 2 begins, not being backed up, and then being deleted by > >> step 3. Is my convern valid? > > > > This is definitely a valid concern, and it depends on how the backup > > tool works -- i.e., it probably builds a list of files to back up > > when it starts, so any files created after this get skipped. > > > > It's safer to remove files that have not been modified for 1 day, but > > only if your backup is successful. > > > >> One other question while I'm at it. What happens if the disk where > >> the archive directory fills up and db2 needs to archive another file? > >> Will the db hang? > > > > No, the user exit will fail and the files will remain in the active > > log path. DB2 will have the retry the operation every 5 minutes. > > > > If the filesystem holding the active log path fills, things are > > different- this is controlled by the database configuration parameter > > BLK_LOG_DSK_FUL. See: http://tinyurl.com/2mbez for more info. > > > > > > > > > > -----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- > > http://www.newsfeeds.com - The #1 Newsgroup Service in the World! > > -----== Over 100,000 Newsgroups - 19 Different Servers! =----- > > > > Thanks. > > On the archived log backup I decided to take a snapshot of the files in > that directory immediately prior to backing it up. > > ls -1 $ARCHIVE_DIR/*.LOG > $ARCHIVE_DIR/files_to_delete > > When the backup finishes I only remove the files captured by the > snapshot. > > xargs rm < $ARCHIVE_DIR/files_to_delete FWIW, After we transfer our logs to our contingency server, we tar them up. We then have another process that are more than xx days old. Chet |