[p4] Moving a depot
Jeff A. Bowles
jab at pobox.com
Tue May 23 08:34:30 PDT 2006
Ya know, before I tried that, I might try something else...
Read up on "p4 depot" before going too far. (I just made a temporary,
toy server area to prove this to myself....)
On the empty server, i ran "p4 depot depot" and told it that the data
was to be located in /tmp/p4-playarea/depot/...
Then I added a file, and - sure enough - the contents files were
under p4-playarea even though the db.* files are under P4ROOT.
If you do this with an existing database, you might need to rename a
couple of things before accessing them. (Me, I'd send a note to Tech
Support to make sure I did it in the right order and so on.)
But if you do it with "p4 depot depot", you are less dependent on the
symlink in the filesystem. (And Windows system administrators might
not have symlinks to start with!)
-Jeff Bowles
[JAB-home:/tmp/p4-playclients/kermit] jeffbowl% p4 client
Client jab.kermit saved.
[JAB-home:/tmp/p4-playclients/kermit] jeffbowl% vi index.txt
[JAB-home:/tmp/p4-playclients/kermit] jeffbowl% p4 add index.txt
//depot/main/index.txt#1 - opened for add
[JAB-home:/tmp/p4-playclients/kermit] jeffbowl% p4 submit ...
Change 1 created with 1 open file(s).
Submitting change 1.
Locking 1 files ...
add //depot/main/index.txt#1
Change 1 submitted.
[JAB-home:/tmp/p4-playclients] jeffbowl% cd /tmp
[JAB-home:/tmp] jeffbowl% ls -CR p4*
p4d
p4-playclients:
kermit
p4-playclients/kermit:
index.txt
p4-playdata:
depot
p4-playdata/depot:
main
p4-playdata/depot/main:
index.txt,v
p4-playroot:
db.archive db.domain db.job db.revcx db.user
db.bodtext db.fix db.label db.revdx db.view
db.change db.fixrev db.locks db.revhx
db.working
db.changex db.group db.logger db.review journal
db.counters db.have db.protect db.revpx p4d
db.depot db.integ db.resolve db.revsx
typescript
db.desc db.integed db.rev db.trigger
[JAB-home:/tmp] jeffbowl% p4 depots
Depot depot 2006/05/23 local /tmp/p4-playdata/depot/... 'Default depot '
[JAB-home:/tmp] jeffbowl%
On May 23, 2006, at 7:59 AM, Arthur van Dongen wrote:
> Hi List,
>
>
>
> Few years ago we created a depot as a subdirectory of the P4ROOT
> directory. Now we want to separate the archive and the database so
> they
> exist on separate filesystems. One of the reasons is that we use
> Amanda
> for backup and the archive + database + checkpoints do not fit on a
> tape.
>
>
>
> The server is running on Linux, so I imagine we could do the
> following:
>
> - Stop the p4d daemon
>
> - Move the depot to a different partition
>
> - Create a symbolic link in the original location so the p4d process
> sees the files on the original path
>
> - Start the pd process
>
> - Modify the depot configuration so the p4d process accesses the files
> directly instead of through the created symbolic link
>
> - Remove the symbolic link
>
>
>
> Without the link the p4d process would run without the archive being
> available on the expected path. And the depot cannot be
> reconfigured on
> a stopped server.
>
>
>
> What is the preferred way to do this? Any comments are welcome.
>
>
>
> Regards,
>
> Arthur van Dongen
>
> _______________________________________________
> perforce-user mailing list - perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
More information about the perforce-user
mailing list