[p4] Example Windows backup script?

Sheizaf, Yariv yariv.sheizaf at sap.com
Mon Aug 13 23:56:30 PDT 2007


Hereby is an old style BAT script I use for Perforce backup over the
last 10 years:

REM Perforce database is located in d:\p4server


cd d:\p4server

REM delete old checkpoint files
del checkpoint.*

REM delete old journal files, except the active journal file
del journal.1*
del journal.2*
del journal.3*
del journal.4*
del journal.5*
del journal.6*
del journal.7*
del journal.8*
del journal.9*

REM create new checkpoint file. Truncate journal file
p4d -jc -z

REM verify database integrity vs. repository
REM    Note: Can take a lot of time. In big databases run it separately
in a REM          different scheduled task
P4 verify -q //...

REM    Backup the checkpoint file, the truncated journal file and the
REM    repository files (RCS + gzip) to an external media, once the 
REM    checkpoint process is completed


Yariv Sheizaf
SAP - B1X Technical Services TL

More information about the perforce-user mailing list