<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://t2bwiki.iihe.ac.be/index.php?action=history&amp;feed=atom&amp;title=InstalldCacheHeadnode</id>
	<title>InstalldCacheHeadnode - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://t2bwiki.iihe.ac.be/index.php?action=history&amp;feed=atom&amp;title=InstalldCacheHeadnode"/>
	<link rel="alternate" type="text/html" href="https://t2bwiki.iihe.ac.be/index.php?title=InstalldCacheHeadnode&amp;action=history"/>
	<updated>2026-04-21T04:02:05Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://t2bwiki.iihe.ac.be/index.php?title=InstalldCacheHeadnode&amp;diff=140&amp;oldid=prev</id>
		<title>Maintenance script: Created page with &quot; == Installation of a dCache Headnode ==  This page details the installation of a quick backup of the dCache headnode and will become the page that details the installation ...&quot;</title>
		<link rel="alternate" type="text/html" href="https://t2bwiki.iihe.ac.be/index.php?title=InstalldCacheHeadnode&amp;diff=140&amp;oldid=prev"/>
		<updated>2015-08-26T12:28:40Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; == Installation of a dCache Headnode ==  This page details the installation of a quick backup of the dCache headnode and will become the page that details the installation ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
== Installation of a dCache Headnode ==&lt;br /&gt;
&lt;br /&gt;
This page details the installation of a quick backup of the dCache headnode and will become the page that details the installation of the new, still to be installed, headnode.&lt;br /&gt;
&lt;br /&gt;
=== Re-installing the old maite ===&lt;br /&gt;
&lt;br /&gt;
On re-installing the old maite, a number of problems were encountered after the machine was installed with the &amp;quot;dCache headnode&amp;quot; template from quattor. &amp;lt;br&amp;gt;&lt;br /&gt;
In the rest of the document, all the backups that were taken are located in : &amp;#039;&amp;#039;&amp;#039;jefke.wn:/storage/userbackup/&amp;lt;something&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
==== Missing config files and symbolic links ====&lt;br /&gt;
Make sure the following symbolic links are present:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ln -s /opt/pnfs/bin/pnfs /etc/init.d/pnfs&lt;br /&gt;
ln -s /opt/d-cache/bin/dcache-core /etc/init.d/dcache-core&lt;br /&gt;
ln -s /opt/d-cache/bin/dcache-srm /etc/init.d/dcache-srm&lt;br /&gt;
ln -s /pnfs/fs /pnfs/ftpBase&lt;br /&gt;
ln -s /pnfs/fs/usr /pnfs/iihe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy all the config files from the backup at &amp;#039;&amp;#039;&amp;#039;/storage/userbackup/Maite_Config/config_dCache.tar.gz&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mv /opt/d-cache /opt/d-cache_orig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and untar the file.&lt;br /&gt;
&lt;br /&gt;
==== Restore the backup of the database ====&lt;br /&gt;
First, just applying the quattor templates did not result in anything working. these are the manual tweaks that are necessary:&amp;lt;br&amp;gt;&lt;br /&gt;
Copy the latest backup of the pnfs database from &amp;#039;&amp;#039;&amp;#039;/storage/userbackup/Maite_Db_backup&amp;#039;&amp;#039;&amp;#039;. You need &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;something&amp;gt;pnfsdb.tar&lt;br /&gt;
full_&amp;lt;something&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
untar pnfsdb.tar to /opt/pnfsdb&amp;lt;br&amp;gt;&lt;br /&gt;
import the pnfsdb into the newly created DB as the user postgres:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
su - postgres&lt;br /&gt;
zcat &amp;lt;path to gzipped full dump&amp;gt; | psql postgres&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now verify with the ssh interface to dcache that the DB has been restored.&lt;br /&gt;
&lt;br /&gt;
==== Miscellaneous configuration ====&lt;br /&gt;
Backup script for the pnfs database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vi /etc/cron.daily/backup_postgres.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and add:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dest=/var/postgres-backup/full_&amp;lt;tt&amp;gt;date &amp;#039;+%s&amp;#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
tar cvf ${dest}-pnfsdb.tar /opt/pnfsdb&lt;br /&gt;
echo &amp;quot;doing pg_dumpall&amp;quot;&lt;br /&gt;
su - postgres -c &amp;quot;pg_dumpall | gzip &amp;gt; $dest.gz&amp;quot;&lt;br /&gt;
echo &amp;quot;done&amp;quot;&lt;br /&gt;
scp ${dest}-pnfsdb.tar jefke.wn:/storage/userbackup/Maite_Db_backup&lt;br /&gt;
scp $dest.gz jefke.wn:/storage/userbackup/Maite_Db_backup&lt;br /&gt;
find /var/postgres-backup -mtime +30 | xargs rm&lt;br /&gt;
ssh  -qx jefke.wn &amp;quot;find /storage/userbackup/Maite_Db_backup -mtime +30 | xargs rm&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure /var/postgres-backup/ exists and is writable by the user postgres.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
copy the file &amp;#039;&amp;#039;&amp;#039;/storage/userbackup/Maite_Config/damadori.tar&amp;#039;&amp;#039;&amp;#039; and untar it in &amp;#039;&amp;#039;&amp;#039;/root&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
==== fire up dcache ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ncm-ncd --co dcache&lt;br /&gt;
/opt/d-cache/bin/dcache start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{TracNotice|{{PAGENAME}}}}&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>