[p4] How to start fresh and retain users and workspaces?
jeffjensen at upstairstechnology.com
Wed Oct 12 18:33:37 PDT 2005
Thanks Steve and Jeff for your replies on the best way to do this (and
especially for the jump starts below Steve). I created a set of very small
bash scripts to export and import the desired specs, and they work very
From: Stephen Vance [mailto:steve at vance.com]
Sent: Saturday, October 08, 2005 7:57 PM
To: Jeff Jensen; perforce-user at perforce.com
Subject: Re: [p4] How to start fresh and retain users and workspaces?
I've written a script, but I don't have it handy. Basically, you just want
to use -o to archive the specs. Just leaving db.client won't do the trick.
There are depots, labels and workspaces in db.domain and elements of those
and branches in db.view.
In Bourne shell, something like
for user in `p4 users | cut -f 1`
p4 user -o $user > user.$user
to save the specs and
for spec in `ls user.*`
p4 user -f -i < $spec
to restore them.
Do this for protect, typemap, users, branches, clients and whatever else you
want to preserve. It would take slightly different process, but you could
also do this for counters.
With security level 3, the passwords will not be preserved. If you want to
do that, you could filter all the db.user records out of the checkpoint or
preserve the db.user file.
At 02:19 PM 10/8/2005, Jeff Jensen wrote:
>I am rolling out Perforce at my customer. We have been playing with a
>30 user eval license this past week. We've practiced the file &
>history conversion about 6 times (of about 7000 source files resulting
>in over 15,000 changelists; the VSS -> P4 script is really fantastic -
>salute to the authors and thank you for doing it!! :-).
>It is time for final rollout prep/cleanup. I would like to just delete
>all the files (both db.* and source files) and start fresh. However, I
>would rather not lose all the created user accounts and their
>workspaces, as they are all set for production use.
>What is the best advice for clearing everything out, yet not having to
>retype all the users and workspaces?
>Has anyone ever just deleted all the db.* files except the client and
>user ones? I hesitate on that, especially anything but the db.user
>table (and on that one too!).
>Does anyone have a script that extracts user and/or workspace info to
>files, and will reload the info? (If yes, what happens to the password
>I also wonder about obliterating everything and manually setting the
>change counter to 1.
>I will appreciate hearing your advice and experiences! TIA!
>perforce-user mailing list - perforce-user at perforce.com
mailto:steve at vance.com
More information about the perforce-user