 <?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.lhep.unibe.ch/index.php?action=history&amp;feed=atom&amp;title=Computing_Tips_and_Tricks</id>
	<title>Computing Tips and Tricks - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.lhep.unibe.ch/index.php?action=history&amp;feed=atom&amp;title=Computing_Tips_and_Tricks"/>
	<link rel="alternate" type="text/html" href="https://wiki.lhep.unibe.ch/index.php?title=Computing_Tips_and_Tricks&amp;action=history"/>
	<updated>2026-05-14T04:43:58Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://wiki.lhep.unibe.ch/index.php?title=Computing_Tips_and_Tricks&amp;diff=141&amp;oldid=prev</id>
		<title>Lhep: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://wiki.lhep.unibe.ch/index.php?title=Computing_Tips_and_Tricks&amp;diff=141&amp;oldid=prev"/>
		<updated>2015-03-18T07:49:24Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;* ===Screen Function===&lt;br /&gt;
All the scanning processes should be started in a screen function in order to be able to access from everywhere. In addition, it&amp;#039;s very easy to kill an process when it hangs (just kill the screen).&lt;br /&gt;
&lt;br /&gt;
 - screen -S myscreen : create a new screen&lt;br /&gt;
 - screen -r : reattach to the screen&lt;br /&gt;
 - screen -x : additionally attach to the screen&lt;br /&gt;
 - inside the screen in order to deattach: Ctrl A D&lt;br /&gt;
 - inside the screen to close: exit&lt;br /&gt;
&lt;br /&gt;
* ===Alias===&lt;br /&gt;
To put in your personal .bashrc file&lt;br /&gt;
 alias  46=&amp;#039;ssh -X scanner@lheppc46.unibe.ch&amp;#039; #pc46&lt;br /&gt;
 alias  56=&amp;#039;ssh -X scanner@lheppc56.unibe.ch&amp;#039; #pc56&lt;br /&gt;
 alias  13=&amp;#039;ssh -X scanner@lhepsun13.unibe.ch&amp;#039; #pcsun13&lt;br /&gt;
&lt;br /&gt;
 alias rm1=&amp;#039;rdesktop -g 1272x930 -k de-ch -u scanner lheppc9&amp;#039; #mic1 remonte desktop&lt;br /&gt;
 alias rm1l=&amp;#039;rdesktop -g 2200x930 -k de-ch -u scanner lheppc9&amp;#039; #mic1 remonte desktop large&lt;br /&gt;
 alias rm2=&amp;#039;rdesktop -g 1272x930 -k de-ch -u scanner lheppc45&amp;#039; #mic2 remonte desktop&lt;br /&gt;
 alias rm2l=&amp;#039;rdesktop -g 2200x930 -k de-ch -u scanner lheppc45&amp;#039; #mic2 remonte desktop large&lt;br /&gt;
 alias rm3=&amp;#039;rdesktop -g 1272x930 -k de-ch -u scanner lheppc16&amp;#039; #mic3 remonte desktop&lt;br /&gt;
 alias rm3l=&amp;#039;rdesktop -g 2200x930 -k de-ch -u scanner lheppc16&amp;#039; #mic3 remonte desktop large&lt;br /&gt;
 alias rm4=&amp;#039;rdesktop -g 1272x930 -k de-ch -u scanner lheppc28&amp;#039; #mic4 remonte desktop&lt;br /&gt;
 alias rm4l=&amp;#039;rdesktop -g 2200x930 -k de-ch -u scanner lheppc28&amp;#039; #mic4 remonte desktop large&lt;br /&gt;
 alias rm5=&amp;#039;rdesktop -g 1272x930 -k de-ch -u scanner lheppc30&amp;#039; #mic5 remonte desktop&lt;br /&gt;
 alias rm5l=&amp;#039;rdesktop -g 2200x930 -k de-ch -u scanner lheppc30&amp;#039; #mic5 remonte desktop large&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* ===NFS disks===&lt;br /&gt;
To access to a directory through NFS.&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;Example :&amp;#039;&amp;#039;&amp;#039;  &lt;br /&gt;
 You want to have access to &amp;#039;&amp;#039;/terabig from lheppc46&amp;#039;&amp;#039; on &amp;#039;&amp;#039;lheppc56&amp;#039;&amp;#039;&lt;br /&gt;
 In this case lheppc46 is the &amp;#039;&amp;#039;server&amp;#039;&amp;#039; and lheppc56 is the &amp;#039;&amp;#039;client&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;Server configuration :&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 - As superuser open /etc/exports&lt;br /&gt;
 - Add    /terabig lheppc56(rw,all_squash,anonuid=1000,anongid=100,sync)     ( more details on [[http://doc.ubuntu-fr.org/nfs]] in french :-) )&lt;br /&gt;
   &amp;#039;&amp;#039;&amp;#039;Remark :   UID of scanner is 1000  &amp;amp; GUID of users is 100&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 - Do   &amp;#039;&amp;#039;exportfs -ra&amp;#039;&amp;#039;    to take into account your modifications&lt;br /&gt;
 - Start the NFS server :    /etc/init.d/nfsserver start&lt;br /&gt;
 - If all is fine go to  &amp;#039;&amp;#039;&amp;#039;Client configuration&amp;#039;&amp;#039;&amp;#039; ,  if not I&amp;#039;m sorry for you&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;Client configuration :&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 - As superuser  mkdir /terabig_lheppc46&lt;br /&gt;
 - Open /etc/fstab  ( TAKE CARE of this file !!!! )&lt;br /&gt;
 - Add    &amp;#039;&amp;#039;lheppc46:/terabig /terabig_lheppc46       nfs     rw,hard,intr,timeo=10 0 0&amp;#039;&amp;#039;      ( more details on [[http://linux.die.net/man/5/nfs]] )&lt;br /&gt;
 - Start NFS client :   &amp;#039;&amp;#039;/etc/init.d/nfs start&amp;#039;&amp;#039;&lt;br /&gt;
 - Now you should see the lheppc46&amp;#039;s data on /terabig_lheppc46 ,  if not I&amp;#039;m sorry for you&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* ===Mount lhepsun6 &amp;amp; lhepsun15   -&amp;gt; WORK IN PROGRESS ===&lt;br /&gt;
SAMBA :&lt;br /&gt;
&lt;br /&gt;
As superuser do :     &lt;br /&gt;
 mount -t smbfs //lhepsun6/share /terabig/scan/lhepsun6&lt;br /&gt;
&lt;br /&gt;
For the moment no rw permissions, I have to check why&lt;br /&gt;
&lt;br /&gt;
Same problem with&lt;br /&gt;
 mount -t cifs //lhepsun6/share /terabig/scan/lhepsun6&lt;br /&gt;
And next line in /etc/fstab  doesn&amp;#039;t work&lt;br /&gt;
 //130.92.139.16/share            /terabig/scan/lhepsun6  smbfs rw,user,username=user,password=pass 0 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Remark :   The asked password is the password login for the user scanner&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* ===[[SSH connection without password]]===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* === Install BackupPC ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Howto backuppc.pdf]] (in french)&lt;br /&gt;
&lt;br /&gt;
[[Image:Config dir backuppc.pdf]]&lt;br /&gt;
&lt;br /&gt;
=== mount and copy to terastation as backup===&lt;br /&gt;
mount disk to pc37 or pc41&lt;br /&gt;
 su&lt;br /&gt;
 mount -t cifs //130.92.139.16/share /terabig/scan/lhepsun6&lt;br /&gt;
&lt;br /&gt;
create list of backup files, e.g. all 2008 published events, divided by mic1 and mic2 (pc41) and 3,4,5 (pc37)&lt;br /&gt;
 pc46&lt;br /&gt;
 /terabig/www/cgi-bin/EventTracer2008&amp;gt;&lt;br /&gt;
 root -l check_tracer.C (here you can define your output list by yourself)&lt;br /&gt;
 bricklist_lhepsun6_pc41() -&amp;gt; list saved in plots/bricklist_lhepsun6_pc41.txt &lt;br /&gt;
 bricklist_lhepsun6_pc37() -&amp;gt; list saved in plots/bricklist_lhepsun6_pc37.txt &lt;br /&gt;
&lt;br /&gt;
run backup&lt;br /&gt;
 execute bricklist_lhepsun6_pc41.txt on pc41&lt;br /&gt;
 execute bricklist_lhepsun6_pc37.txt on pc37&lt;br /&gt;
&lt;br /&gt;
modify etc/fstab : to get the right of writing to scanner&lt;br /&gt;
 LABEL=/                 /                       ext3    defaults        1 1&lt;br /&gt;
 /dev/sda2               /terabig                ext3    defaults        1 2&lt;br /&gt;
 tmpfs                   /dev/shm                tmpfs   defaults        0 0&lt;br /&gt;
 devpts                  /dev/pts                devpts  gid=5,mode=620  0 0&lt;br /&gt;
 sysfs                   /sys                    sysfs   defaults        0 0&lt;br /&gt;
 proc                    /proc                   proc    defaults        0 0&lt;br /&gt;
 LABEL=SWAP-sda3         swap                    swap    defaults        0 0&lt;br /&gt;
 130.92.139.96:/terabig/scan /terabig/scan/lheppc46       nfs     rw,hard,intr,timeo=10 0 0&lt;br /&gt;
 130.92.139.87:/terabig/scan /terabig/scan/lheppc37       nfs     rw,hard,intr,timeo=10 0 0&lt;br /&gt;
 130.92.139.156:/terabig/scan /terabig/scan/lheppc56       nfs     rw,hard,intr,timeo=10 0 0&lt;br /&gt;
 &lt;br /&gt;
 //130.92.139.16/share /terabig/scan/lhepsun6  cifs  defaults,uid=500,gid=100    0  0&lt;br /&gt;
&lt;br /&gt;
 mount -a : mounts everything that is in fstab&lt;br /&gt;
&lt;br /&gt;
=== BACKUP scanning data on terastation ===&lt;br /&gt;
&lt;br /&gt;
* mount disc (should be already done)&lt;br /&gt;
 lhepsun6 130.92.139.16 : various stuff on there&lt;br /&gt;
 lhepsun15 130.92.139.25: -&amp;gt; scanning data under /share/scan&lt;br /&gt;
 lheppc7 -&amp;gt; from ATLAS: mount lheppc7.unibe.ch/ngse5 lheppc7&lt;br /&gt;
&lt;br /&gt;
 su&lt;br /&gt;
 modify /etc/fstab in order to put the right to scanner for writing, add line like&lt;br /&gt;
 //130.92.139.16/share /terabig/scan/lhepsun6  cifs  defaults,uid=500,gid=100    0  0&lt;br /&gt;
 then mount everyting new: &lt;br /&gt;
 mount -a&lt;br /&gt;
&lt;br /&gt;
== the backup is done in the following steps ==&lt;br /&gt;
BE CAREFULL, YOU COULD DELETE STUFF!!!&lt;br /&gt;
&lt;br /&gt;
* Decide what you want to backup&lt;br /&gt;
 - Lheppc41 and lheppc37 are separated in the backup procedure.&lt;br /&gt;
 - Lheppc41 (mic1 and mic2)&lt;br /&gt;
 - Lheppc37 (mic3, mic4 and mic5)&lt;br /&gt;
 - Go go to corresponding directory: /terabig/scan/BACKUP &lt;br /&gt;
   (e.g. if you want to backup stuff from mic3, you go to lheppc37 /terabig/scan/BACKUP)&lt;br /&gt;
 - There is a file called &amp;#039;&amp;#039;&amp;#039;manual_list.txt&amp;#039;&amp;#039;&amp;#039;. In this file, all the bricks you are going to &lt;br /&gt;
   backup should be in there. The format is &amp;quot;brickid&amp;quot; &amp;quot;mic&amp;quot;.&lt;br /&gt;
 - Create the list of bricks with the corresponding mic that you want to backup. &lt;br /&gt;
   You might can use the help of EventTracer.root file.&lt;br /&gt;
 - Once the list is ready, those bricks will be backup.&lt;br /&gt;
&lt;br /&gt;
* Create processing list&lt;br /&gt;
 - In /terabig/scan/BACKUP run root -l manual_list.C&lt;br /&gt;
 - This will produce you 4 files (rsync.sh, remove.txt, symlink.sh and toAdd.txt)&lt;br /&gt;
 - This process crosschecks with the BACKUP_OK_LIST.txt. This file includes the bricks&lt;br /&gt;
   that are already in backup or that you don&amp;#039;t want to backup)&lt;br /&gt;
 - For special bricks that are not labeled the standard way, you have to make a manual list&lt;br /&gt;
   (the list of those bricks is under BACKUP_NOLINK_LIST.txt -&amp;gt; no simlink is created for those)&lt;br /&gt;
&lt;br /&gt;
* Run manual_list_rsync.sh&lt;br /&gt;
 - This file contains all the sync commands&lt;br /&gt;
 - This process syncronizes the data to the location mentioned int he command&lt;br /&gt;
 - This can take a long time and fill up the network traffic&lt;br /&gt;
 - chmod 777 manual_list_rsync.sh in order to make the list executable&lt;br /&gt;
&lt;br /&gt;
* Run manual_list_remove.txt&lt;br /&gt;
 - BE CAREFULL, YOU ARE ABOUT TO DELETE DATA&lt;br /&gt;
 - Copy file: cp manual_list_remove.txt manual_list_remove.sh (security reason not sh in first place)&lt;br /&gt;
 - chmod 777 manual_list_remove.txt in order to make the list executable&lt;br /&gt;
 - Run manual_list_remove.sh (this deletes the files)&lt;br /&gt;
&lt;br /&gt;
* Run manual_list_symlink.sh&lt;br /&gt;
 - Run manual_list_symlink.sh that creates the simlinks from the backup to the original place&lt;br /&gt;
&lt;br /&gt;
* Add manual_list_toAdd.txt&lt;br /&gt;
 - Add the content of manual_list_toAdd.txt to BACKUP_OK_LIST.txt so that we know that we did backup this data&lt;br /&gt;
&lt;br /&gt;
* Exit working space clean and clear&lt;br /&gt;
 - Open manual_list.txt and delete content. The next backup put again bricks inside here.&lt;br /&gt;
 - Make a folder backupYEARMONTHDAY and put all files insdie &lt;br /&gt;
   (except BACKUP_OK_LIST.txt, BACKUP_NOLINK_LIST.txt, manual_list.C and manual_list.txt)&lt;br /&gt;
&lt;br /&gt;
== BACKUP TO DO ==&lt;br /&gt;
* Backup data from pc46 and pc56. pc56 maybe already transferred -&amp;gt; to be checked.&lt;br /&gt;
* Install new backups server that we get from ATLAS&lt;/div&gt;</summary>
		<author><name>Lhep</name></author>
	</entry>
</feed>