<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Perforce Backup and Recovery Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/perforce-backup-and-recovery/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/perforce-backup-and-recovery/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Sat, 27 Feb 2021 09:09:52 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>Recovery Procedures in Perforce Server</title>
		<link>https://www.scmgalaxy.com/tutorials/recovery-procedures-in-perforce-server/</link>
					<comments>https://www.scmgalaxy.com/tutorials/recovery-procedures-in-perforce-server/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Mon, 08 Jan 2018 13:22:33 +0000</pubDate>
				<category><![CDATA[Perforce]]></category>
		<category><![CDATA[Perforce Backup and Recovery]]></category>
		<category><![CDATA[Perforce Recovery Process]]></category>
		<category><![CDATA[Perforce Server Recovery Procedures]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=4563</guid>

					<description><![CDATA[<p>Recovery Procedures in Perforce Server If the database files become corrupted or lost, either because of disk errors, a hardware [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/recovery-procedures-in-perforce-server/">Recovery Procedures in Perforce Server</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Recovery Procedures in Perforce Server</h2>
<p>If the database files become corrupted or lost, either because of disk errors, a hardware failure such as a disk crash, the database can be recreated with your stored checkpoint and journal. it can at least provide a general guideline for recovery from the two most common situations, specifically:</p>
<p>1. corruption of your Perforce database only, without damage to your versioned files, and<br />
2. corruption to both your database and versioned files.</p>
<h2><strong>Case 1: Database corruption, versioned files unaffected</strong></h2>
<p><strong>You will need:</strong><br />
1. The last checkpoint file, which should be available from the latest P4ROOT directory backup.</p>
<p>2. The current journal file, which should be on a separate filesystem from your P4ROOT directory, and which should therefore have been unaffected by any damage to the filesystem where your P4ROOT directory was held.</p>
<p><strong>You will not need:</strong><br />
1. Your backup of your versioned files; if they weren’t affected by the crash, they’re already up to date.</p>
<p><strong>To recover the database</strong></p>
<p>1. Stop the current instance of p4d:</p>
<p>p4 admin stop</p>
<p>(You must be a Perforce superuser to use p4 admin.)</p>
<p>2. Rename (or move) the database (&#8220;db.*&#8221;) files:</p>
<p>mv your_root_dir/db.* /tmp</p>
<p>There can be no db.* files in the $P4ROOT directory when you start recovery from a checkpoint. Although the old db.* files are never used during recovery, it’s good practice not to delete them until you’re certain your restoration was successful.</p>
<p>3. Invoke p4d with the -jr (journal-restore) flag, specifying your most recent checkpoint and current journal. If you explicitly specify the server root ($P4ROOT), the -r $P4ROOT argument must precede the -jr flag:</p>
<p>p4d -r $P4ROOT -jr checkpoint_file journal_file</p>
<p>This recovers the database as it existed when the last checkpoint was taken, and then apply the changes recorded in the journal file since the checkpoint was taken.</p>
<h2>Case 2: Both database and versioned files lost or damaged</h2>
<p><strong>You will need:</strong><br />
1. The last checkpoint file, which should be available from the latest P4ROOT directory backup.<br />
2. Your versioned files, which should be available from the latest P4ROOT directory backup.</p>
<p><strong>You will not need:</strong></p>
<p>Your current journal file. The journal contains a record of changes to the metadata and versioned files that occurred between the last backup and the crash; because you’ll be restoring a set of versioned files from a backup taken before that crash, the checkpoint alone contains the metadata useful for the recovery, and the information in the journal is of limited or no use.</p>
<p><strong>To recover the database</strong></p>
<p>1. Stop the current instance of p4d:</p>
<p>p4 admin stop<br />
(You must be a Perforce superuser to use p4 admin.)</p>
<p>2. Rename (or move) the corrupt database (&#8220;db.&#8221;) files:<br />
mv your_root_dir/db.* /tmp</p>
<p>The corrupt db.* files aren’t actually used in the restoration process, but it’s safe practice not to delete them until you’re certain your restoration was successful.</p>
<p>3. Invoke p4d with the -jr (journal-restore) flag, specifying only your most recent checkpoint:</p>
<p>p4d -r $P4ROOT -jr checkpoint_file</p>
<p><strong>Some Tips While Setting up Perforce Server Configuration to have best Backup &amp; Recovery methodlogy</strong></p>
<p>1. Make sure you are using Symbolic Links for storing versioned files in another drive<br />
2. Make sure you are Storing Journal files in differnet directory<br />
2. Make sure you are storing check points in different directory</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/recovery-procedures-in-perforce-server/">Recovery Procedures in Perforce Server</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/recovery-procedures-in-perforce-server/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
