Perforce backup and recovery mechanisms and policies

Source: Internet
Author: User
Tags perforce

Introduction to backup implemented by perforce

 

Creation Method: On the perforce server, use the-JC flag to create the server.

By default, the P4d-r root-JC is saved as the checkpoint. N file and journal. n-1 in the root directory of the perforce program to record historical data at the same time.

The last checkpint. N and this journal. This is all the information of the current checkpoint database. For example, you can use checkpint.5 and change log journal.5 to restore data to checkpoint.6. It can also be understood as checkpoint5 + journal.5 = checkpoint.6.

Store checkpoint and journal in a specific folder or use the File prefix. The-JC option is also used. For example, p4d-JC prefix stores checkpoint as prefix. CKP. N and prefix. JNL. n. If there is no prefix, it is saved as checkpoint. N & journal. N by default.

Use P4 admincheckpoint [Z] [prefix] to implement backup without logging on to the server. You must be a super administrator.

During restoration, the checkpoint must be at least as old as the source program file in the current depot. The time difference between the two, the smaller the better. Of course, the program file can be newer than the checkpoint file.

Journal files

Is the log file of all the Database Change sets on the server (the start time is the last backup), and Journal files is the link between two checkpoints.
Are you sure you want to enable journnaling when creating a checkpoint,

Open journaling: Use p4d-JC and p4d-J journalfile immediately. The journal name and archive address can be changed.
Note: If you have created a Journal File With-jfilename flag, make sure that the sequence checkpoints uses the same name. Otherwise, journaling will not be named correctly.

Disable journaling and set p4journal to off. If-J flag is not used, run the p4d command.

Versioned files:

 

The source program file is stored in a directory on the server. It is stored as the RC root type and uses filename. V. There is only one RCS-format file for each text file,

After the Checkpointing operation:
To ensure that the versioned file reflects all the information of the database. Those source program files must be resaved,

Backup process:

1. confirm that the files on the server are complete, add MD5 data and file length information to a new file.

P4 verify //...

Using P4 verify-Q ensures that only the error information is output.

2. Run p4d-JC or P4 admincheckpoint.

3. The database will be locked during Backup. It is best to stop the server during Backup.

4. Run the following command to stop or start the server:

Netstart perforce,Netstop perforce/P4 admin stop

5. After the checkpoint is successfully created, back up the source program file,

6. If the checkpoint is successfully created,

7. You do not need to back up DB. *. Your latest checkpoint, journal, and source programs contain all the information for restoration.

Recovery Process:

The data path is damaged and the source program file is not affected:

1.1 prepare the checkpoint file of the last backup,

1.2 prepare the current Journal file,

1.3 Stop the current perforce operation, p4d admin stop

1.4 rename or remove the DB. * file.

1.5 call the p4d-Jr command to determine the last checkpoint and current Journal. If you want to specify the server root, use the-r $ p4root parameter. For example:

P4d-r $ p4root-Jr checkpoint_file journal_file

Database files and source program files are damaged:

2.1 ensure that the versiondfiles source program cannot be older than the checkpoint program.

2.2 The Last checkpoint file backed up. Your versioned file is stored in the p4root directory,

2.3 stop service, P4 admin stop

2.4 rename or remove the DB. * file,

2.5 call p4d with the-Jr parameter, for example: P4d-r $ p4root-Jr checkpoint_file

2.6 restore the data file and place it in the original location.

2.7 verify data integrity after data recovery.

Run the command p4verify-Q //...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.