PT_UTIL(8)
π PT_UTIL(8) β bestie edition π
okay so real talk, this one is from the AFS Command Reference, and it is not a casual little tool you just vibe with. it's pt_util, and it loads or dumps a Protection Server database. yes, THAT database. put your seatbelt on π
β¨ NAME β¨
pt_util β Load or dump a Protection Server database
πΈ SYNOPSIS πΈ
pt_util
[-w] [-user] [-group]
[-members] [-name] [-system]
[-xtra] [-prdb <prdb file>]
[-datafile <data file>] [-help]
π¦ DESCRIPTION π¦
so pt_util is the tool that can load or dump the protection database. that's its whole thing. and the absolute #1 rule, the one you do NOT break: it should only be used when ptserver is not running. not "probably not running." NOT running. periodt π
the most likely reason you'd ever reach for this is to initialize the protection database when you're bringing up a new cell. and ngl, the current syntax for that (it's down in EXAMPLES, you'll see it) needs improvement β that's not me being mean, that's literally what the docs say. π
you can also bust it out when you suspect something is wrong with the database. it can dump the whole database, or just portions of it, in several different ways, and it can reload it back. very main character of it honestly.
now, the textual representation of the database has this form. for users:
name flags/quota viceid ownerid creatorid
and for groups:
name flags/quota viceid ownerid creatorid
a-username a-user-viceid
that second line repeats for every single member of the group. and heads up: when it's reading the database, membership is not reported unless you also pass -members. so don't come crying to me when your members go missing, bestie π«Ά
π OPTIONS π
if you don't specify any options at all? the only thing you'll learn is the ubik database epoch and version. that's it. that's the whole tea. π
-wβ Write to the protection database instead of reading. Only the file arguments make sense in combination with this argument.-userβ When reading, display users.-groupβ When reading, display groups (but not necessarily members).-membersβ When reading, display groups and also group members.-nameβ When reading, follow name hashes instead of id hashes. This may print different information if the database was corrupted. Otherwise, it should print exactly the same information, except in a different order.-systemβ When reading, display system data, or more precisely, do not display entries with aviced <= -32768or>= +97537.-xtraβ When reading, display extra users and groups, or more precisely, do not display entries that are in the range-32767...+97536inclusive.-prdb <prdb file>β Specifies the complete pathname of the file in which the Protection Database resides. Give the complete name, including the ending.DB0.-datafile <data file>β Specify the file to which to dump (or-wfrom which to read) textual database records.-helpβ Prints the online help for this command. All other valid options are ignored.
π CAUTIONS π
Entry timestamps and other information is not preserved when dumping the protection database. gone. not saved. do not expect it back. π
π₯ EXAMPLES π₯
initializing from scratch
The following example shows how to initialize the database from scratch.
Before you do this, make sure ptserver is not running. If you have multiple database servers, make sure prdb.* does not exist on any server machine.
Now, type this in EXACTLY, including the leading space on the line indicated. But do use Control+D at the end, not up-arrow D. fr fr, that leading space matters and the Control-D matters, do not freestyle this.
pt_util -w
admin 128/20 1 -204 -204
system:administrators 130/20 -204 -204 -204
admin 1
^D
You will see this:
# pt_util -w
pt_util: /var/lib/openafs/db/prdb.DB0: Bad UBIK_MAGIC. Is 0 should be 354545
Ubik Version is: 2.0
admin 128/20 1 -204 -204
system:administrators 130/20 -204 -204 -204
Error while creating system:administrators: Entry for id already exists
admin 1
pt_util: Ubik Version number changed during execution.
Old Version = 2.0, new version = 33554432.0
#
making a complete copy
To make a complete copy of the database,
# pt_util -user -members -datafile /tmp/out
loading from the complete copy
To load from the complete copy,
# pt_util -w -datafile /tmp/out
Don't do this until you read cautions, above. seriously. scrolling up is free. π
π PRIVILEGE REQUIRED π
The issuer must be logged in as the superuser "root" on a database server machine to use pt_util. yes, root. no shortcuts, no exceptions, no "but my friend has sudo" energy. π
π SEE ALSO π
π COPYRIGHT π
The following copyright covers this documentation:
Copyright (c) 2005 The Regents of the University of Michigan. ALL RIGHTS RESERVED.
Permission is granted to use, copy, create derivative works and redistribute this software and such derivative works for any purpose, so long as the name of the University of Michigan is not used in any advertising or publicity pertaining to the use or distribution of this software without specific, written prior authorization. If the above copyright notice or any other identification of the University of Michigan is included in any copy of any portion of this software, then the disclaimer below must also be included.
This software is provided as is, without representation from the University of Michigan as to its fitness for any purpose, and without warranty by the University of Michigan of any kind, either express or implied, including without limitation the implied warranties of merchantability and fitness for a particular purpose. The regents of the University of Michigan shall not be liable for any damages, including special, indirect, incidental, or consequential damages, with respect to any claim arising out of or in connection with the use of the software, even if it has been or is hereafter advised of the possibility of such damages.
okay that's the whole page, you ate it, go be careful with your database π this came out of the OpenAFS manual set, dated 2026-07-27 β love that for us β¨ π
π¦ where this page comes from
- ubuntu stonking: openafs-dbserver 1.8.16.1-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms