Help Center

udb-sanitizer: Database Maintenance Utility

Overview

The Urchin Database Maintenance Utility, udb-sanitizer, provides a means for checking the Urchin 6 profile databases and performing various maintenance operations on these databases.

The types of operations that udb-sanitizer can perform are:

Usage

udb-sanitizer is located in the util directory of the Urchin 6 distribution.

Usage of the utility is as follows:

  udb-sanitizer [-h] (prints usage message and exits)

  udb-sanitizer [-v] (prints version and exits)

  udb-sanitizer -p profile [-d YYYYMM[DD]] -bfhprq] [-z [-e DD]] 

where:

   -b  go directly to rollback option

   -d  specifies year-month and optionally the day to operate on

   -e  with z and d options, zero multiple days (range d->e) in same month

   -f  force action to occur without confirmation

   -h  print this help information

   -p  specifies name of profile (required)

   -a  specifies name of account

   -r  go directly to remove option

   -q  quiet mode, suppress output except for critical user confirmation

   -z  go directly to zero-day option 

Note: When udb-sanitizer is called with options that do not completely describe what action to take, it will display the usage text (equivalent to -h option). You can cause an action to be performed without any user interaction by using a combination of options –f and -q in conjunction with applicable use of the -d, -b, -r, or -z options.

Operation

In normal operation, udb-sanitizer is invoked from a command shell with providing options applicable for planned type of operation.

Actions associated with an available options presented above are:

1. Data rollback (–r)

2. Delete monthly data (-d)

udb-sanitizer -f –q -r -d 200309 -p mysite.com 

3. Zero data for one or more days

udb-sanitizer –f -q -z -d 20030907 -p mysite.com 

udb-sanitizer -f -z -d 20030907 -e 10 -p mysite.com 

4. If the profile is part of an account, then account name should be specified using the -a argument.

Important: Actions that delete daily or monthly data cannot be undone! The only recourse is to reprocess the webserver logs for that time period to repopulate the profile databases. Use these options with care.