scruboplog
Applicability
Product | Command type |
---|---|
MultiSite | multiutil subcommand |
Platform |
---|
UNIX |
Windows |
Synopsis
- scruboplog
{ [ –cl/an clan-name ] [ –site site-name ] | [ –dbset dbset-name ] }
–fam/ily family-name –u/ser username –p/assword password
–before { date-time | oplog-ID }
Description
Operation log (oplog) entries must be kept in the replica for a significant period of time. They are used when the replica generates update packets to send to all other replicas. Oplog entries also may be required to help other replicas recover from failures.
However, you may want to delete (scrub) oplog entries occasionally to optimize hard drive space where the replica resides. You can also use the scruboplog command to delete the oplog of a replica that will no longer be used.
Although oplog entries record only the changes that have taken place in your replica, over time this information could require as much space as the data itself.
Before scrubbing oplog entries for a replica, you must be sure that they are no longer needed and that the other replicas in the family have the information that you want to delete from the replica's oplog. Also, you must synchronize the replicas in a family before scrubbing oplogs.
You can also use the scruboplog command to clean up databases that are not deployed in a Rational® ClearQuest® MultiSite environment and use the Rational ClearQuest Web full-text search feature.
Restrictions
You must have Super User privileges.
Options and arguments
Specifying the clan, site, and family
- Default
- Clan: First clan replicated at this site. If there is more than one dbset
connection registered on this host, –clan is required.
Site: Current site. If there is more than one site on this host, –site is required.
Family: No default; you must specify a family.
- –cl/an clan-name
- Name of the replica’s clan.
- –site site-name
- Name of the replica’s site.
- –fam/ily family-name
- User database family: Database name given to the user database when it
was created.
Schema repository family: The family name is MASTR.
Specifying the dbset and family
You can use the scruboplog command to clean up databases that are not deployed in a Rational ClearQuest MultiSite environment and use the Rational ClearQuest Web full-text search feature.
- Default
- Database set: Rational ClearQuest version.
- Family: No default; you must specify a family.
- –dbset dbset-name
- Name of the database connection.
- –fam/ily family-name
- User database family: Database name given to the user database when it is created.
- Schema repository family: The family name is MASTR.
Specifying a user name and password
- Default
- You must specify a user name and password.
- –u/ser user
- Name of a user with Super User privileges.
- –p/assword password
- Password associated with the specified user.
Specifying the entries to delete
- Default
- You must specify the entries to be deleted.
- –before { date-time | oplog-ID }
- Deletes all oplog entries before the specified date-time or oplog-ID.
The argument is not inclusive: oplog entries created on the specified
date or at the specified time are not deleted, and the oplog entry
with the specified ID is not deleted.
The oplog-ID argument must be an integer.
To ensure that you do not accidentally delete oplogs, you must specify a year when you use this command. If you enter a date without specifying the year, this command assumes the current calendar year; for example, if in February 2006 you attempt to remove all oplogs created before November 19, 2005, and you use an entry of 19-November, scruboplog deletes all oplogs created before November 19, 2006, which includes all oplogs in the current year (since they are all prior to November 2006).
To display a replica's operation log, use dumpoplog. The date-time argument can have any of the following formats:
- date.time | date | time
- where:
- date:
- = day-of-week | long-date
- time:
- = h[h]:m[m][:s[s]] [UTC [ [ + | - ]h[h][:m[m] ] ] ]
- day-of-week:
- = today |yesterday |Sunday | ... |Saturday |Sun | ... |Sat
- long-date:
- = d[d]–month[–[yy]yy]
- month:
- = January |... |December |Jan |... |Dec
Specify the time in 24-hour format, relative to the local time zone. If you omit the time, the default value is 00:00:00. If you omit the date, the default value is today. If you omit the century, year, or a specific date, the most recent one is used. Specify UTC if you want the time to be resolved to the same moment in time regardless of time zone. Use the plus (+) or minus (-) operator to specify a positive or negative offset to the UTC time. If you specify UTC without hour or minute offsets, the default setting is Greenwich Mean Time (GMT). (Dates before January 1, 1970 Universal Coordinated Time (UTC) are not valid.)
Examples- 22-November-2002
- sunday
- yesterday.16:00
- 0
- 8-jun
- 13:00
- today
- 9-Aug.10:00UTC
Examples
In these examples, the lines are broken for readability. You must enter each command on a single physical line.
- Delete oplog entries before January 21, 2002 for
the DEV family of the boston_hub replica.
multiutil scruboplog -clan telecomm -site boston_hub -family DEV
-user susan -p passwd -before 21-January-2002 - Delete oplog entries 1 through 300 for the TEST family
of the tokyo replica.
multiutil scruboplog -clan testing -site tokyo -family TEST
-user masako -p passwd -before 301
- Delete oplog entries before January 1, 2009 for the PTEST user database of the CLSIC database
set where the user database is not deployed in a Rational
ClearQuest MultiSite
configuration:
multiutil scruboplog -dbset CLSIC -family PTEST -user susan -p passwd -before 1-January-2009