Introduction
We are exploiting the official PSI backup system "Legato" by installing and configuring the Linux client like WELL described in this PSI How To.
Please follow the PSI How To first and if it's not enough then invest time by also reading this Wiki page.
T3 backuped hosts
We've decided to backup the following systems:
-
t3admin01
-
t3cmsvobox02
-
t3ce02
-
t3ui04
-
t3fs13
-
t3fs14
-
t3se01
<-- as far as 12th Jun 2013 our production dCache SRM
-
t3dcachedb03
<-- as far as 12th Jun 2013 our production dCache DB
-
t3dcachedb04
-
t3wn20
How to recover files by CLI - command recover
You can browse and decide to recover the backups of a
t3*
file or directory by log in into that server
t3*
and by invoking
'recover'; it follows an example of its usage on the server
t3wn20
,
note the bs1
parameter, that's the PSI Legato backup server:
[root@t3wn20 tmp]# recover -d /tmp/prova -s bs1
Current working directory is /tmp//
recover> ?
6477:recover: Available commands are:
add [-q] [filename] - add `filename' to list of files to be recovered
cd [dir] - change directory to dir
changetime [date | -l locale_date] - change the time that you are browsing, changetime [-l] displays the supported [[locale_]date] format
debug
delete [filename] - delete `filename' from the recover list
destination - print destination location for recovered files
dir [/w] [filename...] - list filename
exit - immediately exit program
force - overwrite existing files
help or `?' - print this list
lf [-aAcCdfFgilLqrRsStu1] [filename...] - list filename type
list [-c | -l] - list the files marked for recover
ll [-aAcCdfFgilLqrRsStu1] [filename...] - long list filename
ls [-aAcCdfFgilLqrRsStu1] [filename...] - list filename
noforce - do not overwrite existing files
pwd - print current directory
quit - immediately exit program
recover - recover requested files
relocate [dir] - specify new location for recovered files
verbose - toggle verbose mode; feedback about what is going on
versions [filename] - report on each version of file `filename'
volumes [filename] - report volumes needed to recover marked files
6478:recover: `filename' can be either a file or a directory
recover> destination
recover files into /tmp/prova
recover> changetime 13 Apr 2011
6497:recover: time changed to Wed 13 Apr 2011 11:59:59 PM CEST
recover> destination
recover files into /tmp/prova
recover> verbose
6486:recover: verbose mode off
recover> verbose
6487:recover: verbose mode on
recover> cd /var/log
recover> ls -l
total 190436
-r-s--s--t root 2358 Mar 14 10:13 acpid
-rw------- root 274679 Feb 03 2010 anaconda.log
...
-rw-r--r-- root 24216 Apr 14 04:05 rpmpkgs
...
recover>
recover> add rpmpkgs
1 file(s) marked for recovery
recover> recover
Recovering 1 file from /var/log/ into /tmp/prova
Volumes needed (all on-line):
ediskinc.01.RO at rd=bs2:g:\eddev1\_AF_readonly
Total estimated disk space needed for recover is 24 KB.
Requesting 1 file(s), this may take a while...
Requesting 1 recover session(s) from server.
./rpmpkgs
Received 1 file(s) from NSR server `bs1'
Recover completion time: Fri 15 Apr 2011 09:56:54 AM CEST
recover> exit
[root@t3wn20 prova]# ll
total 24
-rw-r--r-- 1 root root 24216 Apr 14 04:05 rpmpkgs
[root@t3wn20 prova]#
How to recover files by GUI - command nwrecover
You can browse and decide to restore files also by the GUI
nwrecover:
[root@t3wn20 tmp]# nwrecover -s bs1
- Legato graphical command
nwrecover
:
- Legato graphical command
nwrecover
:
Legato installation for ver. 7.4, but now we use ver. 7.6
As an occasional T3 admin you're not suppose to install and configure Legato, just browse backups and occasionally restore them; personally I never needed to restore a file.
You can find the Legato installation file in this dir:
[root@t3admin01 home]# ll /root/legato-backup-clients/
total 407664
-rwx------ 1 root root 417031839 Feb 10 19:31 nw74sp5_linux_x86_64.tar.gz
This is the Legato installation procedure on Linux 64bit:
[root@t3nfs01 ~]# tar -xzvf nw74sp5_linux_x86_64.tar.gz
linux_x86_64/
linux_x86_64/lgtoclnt-7.4.5.10-1.x86_64.rpm
linux_x86_64/lgtolicm-7.4.5.10-1.x86_64.rpm
linux_x86_64/lgtoman-7.4.5.10-1.x86_64.rpm
linux_x86_64/lgtonode-7.4.5.10-1.x86_64.rpm
linux_x86_64/lgtoserv-7.4.5.10-1.x86_64.rpm
linux_x86_64/lgtofr-7.4.5.10-1.x86_64.rpm
linux_x86_64/lgtoja-7.4.5.10-1.x86_64.rpm
linux_x86_64/lgtoko-7.4.5.10-1.x86_64.rpm
linux_x86_64/lgtozh-7.4.5.10-1.x86_64.rpm
linux_x86_64/lgtonmc-3.4.5-1.i686.rpm
linux_x86_64/LGTO_METAFILE.linuxx86_64
linux_x86_64/sd_products.res
linux_x86_64/jre-1_5_0_15-linux-i586.bin
[root@t3nfs01 ~]# yum install linux_x86_64/lgtoclnt-7.4.5.10-1.x86_64.rpm linux_x86_64/lgtoman-7.4.5.10-1.x86_64.rpm
Loading "kernel-module" plugin
Setting up Install Process
Setting up repositories
sl46base 100% |=========================| 951 B 00:00
sl46psi 100% |=========================| 951 B 00:00
sl46others 100% |=========================| 951 B 00:00
sl46nonfree 100% |=========================| 951 B 00:00
rpmforge 100% |=========================| 1.1 kB 00:00
sl46kernel 100% |=========================| 951 B 00:00
sl46update 100% |=========================| 951 B 00:00
Reading repository metadata in from local files
primary.xml.gz 100% |=========================| 219 kB 00:00
sl46psi : ################################################## 1964/1964
Added 0 new packages, deleted 0 old in 0.69 seconds
primary.xml.gz 100% |=========================| 57 kB 00:00
sl46others: ################################################## 207/207
Added 0 new packages, deleted 0 old in 0.08 seconds
primary.xml.gz 100% |=========================| 2.3 MB 00:00
rpmforge : ################################################## 11880/11880
Added 71 new packages, deleted 0 old in 6.71 seconds
primary.xml.gz 100% |=========================| 367 kB 00:00
sl46update: ################################################## 2809/2809
Added 148 new packages, deleted 136 old in 2.67 seconds
Parsing package install arguments
Examining linux_x86_64/lgtoclnt-7.4.5.10-1.x86_64.rpm: lgtoclnt - 7.4.5.10-1.x86_64
Marking linux_x86_64/lgtoclnt-7.4.5.10-1.x86_64.rpm to be installed
Examining linux_x86_64/lgtoman-7.4.5.10-1.x86_64.rpm: lgtoman - 7.4.5.10-1.x86_64
Marking linux_x86_64/lgtoman-7.4.5.10-1.x86_64.rpm to be installed
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package lgtoman.x86_64 0:7.4.5.10-1 set to be updated
---> Package lgtoclnt.x86_64 0:7.4.5.10-1 set to be updated
--> Running transaction check
Beginning Kernel Module Plugin
Finished Kernel Module Plugin
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
lgtoclnt x86_64 7.4.5.10-1 linux_x86_64/lgtoclnt-7.4.5.10-1.x86_64.rpm 138 M
lgtoman x86_64 7.4.5.10-1 linux_x86_64/lgtoman-7.4.5.10-1.x86_64.rpm 1.3 M
Transaction Summary
=============================================================================
Install 2 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 140 M
Is this ok [y/N]: y
Downloading Packages:
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: lgtoclnt ######################### [1/2]
Installing: lgtoman ######################### [2/2]
Installed: lgtoclnt.x86_64 0:7.4.5.10-1 lgtoman.x86_64 0:7.4.5.10-1
Complete!
[root@t3nfs01 ~]#
[root@t3nfs01 ~]# service networker start
[root@t3nfs01 ~]# echo bs1.psi.ch > /nsr/res/server
[root@t3nfs01 ~]# cat nsradmin76_x.txt
. type: NSRLA
update administrator:"isroot,host=t3nfs01.psi.ch","isroot,host=localhost","user=root,host=localhost","user=administrator,host=bs1"
. type: NSR System Port Ranges
update administrator:"isroot,host=t3nfs01.psi.ch","isroot,host=localhost","user=root,host=localhost","user=administrator,host=bs1"
[root@t3nfs01 ~]# nsradmin -i ./nsradmin76_x.txt -p nsrexec
Current query set
updated resource id 3.0.174.126.0.0.0.0.217.54.162.80.0.0.0.0.192.33.123.206(16)
Current query set
updated resource id 7.0.174.126.0.0.0.0.217.54.162.80.0.0.0.0.192.33.123.206(3)
[root@t3nfs01 ~]# service networker stop && service networker start && service networker status
+--o nsrexecd (30710)
[root@t3nfs01 ~]# chkconfig --list | grep networker
networker 0:off 1:off 2:off 3:on 4:off 5:on 6:off
[root@t3nfs01 ~]# rm -rf nw74sp5_linux_x86_64.tar.gz linux_x86_64
[root@t3nfs01 ~]# grep bs /etc/hosts.allow
nsrexecd: bs1.psi.ch bs2.psi.ch
[root@t3wn20 cron.daily]# cat /nsr/logs/daemon.raw
0 1301488857 2 0 0 1879726640 5665 0 t3wn20.psi.ch nsrexecd 2 %s 1 0 28 @(#) Product: NetWorker
0 1301488857 2 0 0 1879726640 5665 0 t3wn20.psi.ch nsrexecd 2 %s 1 0 27 @(#) Release: 7.4.5.10
0 1301488857 2 0 0 1879726640 5665 0 t3wn20.psi.ch nsrexecd 2 %s 1 0 22 @(#) Build number: 810
0 1301488857 2 0 0 1879726640 5665 0 t3wn20.psi.ch nsrexecd 2 %s 1 0 47 @(#) Build date: Tue Jul 27 07:17:18 PDT 2010
0 1301488857 2 0 0 1879726640 5665 0 t3wn20.psi.ch nsrexecd 2 %s 1 0 27 @(#) Build arch.: linux86w
0 1301488857 2 0 0 1879726640 5665 0 t3wn20.psi.ch nsrexecd 2 %s 1 0 53 @(#) Build info: DBG=0,OPT=-O2 -fno-strict-aliasing
0 1301488915 2 0 0 874830384 5970 0 t3wn20.psi.ch nsrexecd 2 %s 1 0 28 @(#) Product: NetWorker
0 1301488915 2 0 0 874830384 5970 0 t3wn20.psi.ch nsrexecd 2 %s 1 0 27 @(#) Release: 7.4.5.10
0 1301488915 2 0 0 874830384 5970 0 t3wn20.psi.ch nsrexecd 2 %s 1 0 22 @(#) Build number: 810
0 1301488915 2 0 0 874830384 5970 0 t3wn20.psi.ch nsrexecd 2 %s 1 0 47 @(#) Build date: Tue Jul 27 07:17:18 PDT 2010
0 1301488915 2 0 0 874830384 5970 0 t3wn20.psi.ch nsrexecd 2 %s 1 0 27 @(#) Build arch.: linux86w
0 1301488915 2 0 0 874830384 5970 0 t3wn20.psi.ch nsrexecd 2 %s 1 0 53 @(#) Build info: DBG=0,OPT=-O2 -fno-strict-aliasing
0 1301489237 2 0 0 2765064752 6169 0 t3wn20.psi.ch nsrexecd 2 %s 1 0 28 @(#) Product: NetWorker
0 1301489237 2 0 0 2765064752 6169 0 t3wn20.psi.ch nsrexecd 2 %s 1 0 27 @(#) Release: 7.4.5.10
0 1301489237 2 0 0 2765064752 6169 0 t3wn20.psi.ch nsrexecd 2 %s 1 0 22 @(#) Build number: 810
0 1301489237 2 0 0 2765064752 6169 0 t3wn20.psi.ch nsrexecd 2 %s 1 0 47 @(#) Build date: Tue Jul 27 07:17:18 PDT 2010
0 1301489237 2 0 0 2765064752 6169 0 t3wn20.psi.ch nsrexecd 2 %s 1 0 27 @(#) Build arch.: linux86w
0 1301489237 2 0 0 2765064752 6169 0 t3wn20.psi.ch nsrexecd 2 %s 1 0 53 @(#) Build info: DBG=0,OPT=-O2 -fno-strict-aliasing
0 1302785845 2 0 0 735162928 15674 0 t3wn20.psi.ch nsrexecd 2 %s 1 0 28 @(#) Product: NetWorker
0 1302785845 2 0 0 735162928 15674 0 t3wn20.psi.ch nsrexecd 2 %s 1 0 26 @(#) Release: 7.6.1.3
0 1302785845 2 0 0 735162928 15674 0 t3wn20.psi.ch nsrexecd 2 %s 1 0 22 @(#) Build number: 446
0 1302785845 2 0 0 735162928 15674 0 t3wn20.psi.ch nsrexecd 2 %s 1 0 47 @(#) Build date: Fri Jan 28 19:27:48 PST 2011
0 1302785845 2 0 0 735162928 15674 0 t3wn20.psi.ch nsrexecd 2 %s 1 0 27 @(#) Build arch.: linux86w
0 1302785845 2 0 0 735162928 15674 0 t3wn20.psi.ch nsrexecd 2 %s 1 0 53 @(#) Build info: DBG=0,OPT=-O2 -fno-strict-aliasing
[root@t3wn20 cron.daily]#
Solaris not supported by PSI
We use
ZFS snapshots
on Solaris
/
.
--
FabioMartinelli - 2011-03-30