UPDATE-SMART-DRIVEDB(8)

NAME
update-smart-drivedb - update smartmontools drive database

SYNOPSIS
update-smart-drivedb [OPTIONS] [DESTFILE]

DESCRIPTION

[NEW EXPERIMENTAL UPDATE-SMART-DRIVEDB 8.0 CHANGE] This tool has been considerably modified due to the move of smartmontools from SourceForge SVN to GitHub.

update-smart-drivedb updates /usr/local/var/lib/smartmontools/drivedb.h or DESTFILE from branch 'drivedb/7.5' of smartmontools git repository. The tools used for downloading are either curl(1), wget(1), fetch(1) [FreeBSD only], ftp(1) [OpenBSD only], or lynx(1).

The downloaded file is verified with OpenPGP/GPG key ID 721042C5. The public key block is included in the script.

The old file is kept if the downloaded file is identical, otherwise it is moved to drivedb.h.old.

The old file is also kept if the downloaded file reports an older version on the same branch. This could be overridden with the '--force' option. If the branch version differs, the file is always updated.

OPTIONS

-s SMARTCTL, --smartctl SMARTCTL
    Use the smartctl(8) executable at path SMARTCTL for drive database syntax check. The form '-s -' disables the syntax check. The default is /usr/local/sbin/smartctl.

-t [DIR/]TOOL, --tool [DIR/]TOOL
    Use TOOL for download. TOOL is one of: curl wget fetch ftp lynx. The default is the first one found in PATH. If a DIR is also specified, the plain TOOL name must begin with any of the above names.

-u LOCATION, --url-of LOCATION
    Use URL of LOCATION for download. LOCATION is one of:
    github (upstream git repository),
    svn (previous SVN repository),
    trac (Trac code browser).
    The default is github.

--url URL
    Download from URL. A valid OpenPGP/GPG signature with '[.raw].asc' extension must also exist unless '--no-verify' is also specified.

--file FILE
    Copy from local FILE. A valid OpenPGP/GPG signature 'FILE[.raw].asc' must also exist unless '--no-verify' is also specified.

--install
    Copy from originally installed drive database file. This is the same as:
    '--no-verify --file /usr/local/share/smartmontools/drivedb.h'

--main
    Download from main branch. This requires '--no-verify' because these versions are not signed.

--branch X.Y
    Download from branch X.Y.

--cacert FILE
    Use CA certificates from FILE to verify the peer.

--capath DIR
    Use CA certificate files from DIR to verify the peer.

--insecure
    Don't abort download if certificate verification fails.

--no-verify
    Don't verify signature with GnuPG.

--force
    Allow downgrades. By default, the database is not replaced with an older version of the same branch.

--export-key
    Print the OpenPGP/GPG public key block.

--dryrun
    Print download commands only.

-q, --quiet
    Suppress info messages.

-v, --verbose
    Verbose output.

-h, --help
    Print help text.

EXAMPLES
Regular update:
# update-smart-drivedb
/usr/local/var/lib/smartmontools/drivedb.h 7.5/5701 updated to 7.5/5706

Revert to previous version:
# update-smart-drivedb --force \
  --file /usr/local/var/lib/smartmontools/drivedb.h.old
/usr/local/var/lib/smartmontools/drivedb.h 7.5/5706 downgraded to 7.5/5701

Download the database from main branch to current directory:
$ update-smart-drivedb --main --no-verify -s - -u trac drivedb-main.h
drivedb-main.h 7.5/? newly installed (NOT VERIFIED)

EXIT STATUS
The exit status is 0 if the database has been successfully updated or is already up to date. If an error occurs the exit status is 1.

FILES

/usr/local/sbin/update-smart-drivedb
    full path of this script.

/usr/local/sbin/smartctl
    used to check syntax of new drive database.

/usr/local/share/smartmontools/drivedb.h
    originally installed drive database.

/usr/local/var/lib/smartmontools/drivedb.h
    current drive database.

/usr/local/var/lib/smartmontools/drivedb.h.asc
    signature file.

/usr/local/var/lib/smartmontools/drivedb.h.old[.asc]
    previous files.

/usr/local/var/lib/smartmontools/drivedb.h.error[.asc]
    new files if rejected due to errors.

/usr/local/var/lib/smartmontools/drivedb.h.lastcheck
    empty file created if downloaded file was identical.

/usr/local/var/lib/smartmontools/drivedb.h.raw[.asc]
    no longer used and removed if still present.

AUTHORS
Christian Franke.
This manual page was originally written by Hannes von Haugwitz <hannes@vonhaugwitz.com>.

REPORTING BUGS
To submit a bug report, create a ticket in smartmontools wiki:
<https://www.smartmontools.org/>.
Alternatively send the info to the smartmontools support mailing list:
<https://listi.jpberlin.de/mailman/listinfo/smartmontools-support>.

SEE ALSO
smartctl(8), smartd(8).

PACKAGE VERSION
smartmontools-@SMARTMONTOOLS_GIT_VER_DESC@ @SMARTMONTOOLS_GIT_REV_DATE@ @SMARTMONTOOLS_GIT_REV@