Thursday, November 26, 2015
Wednesday, November 25, 2015
BackupPC
BackupPC
Backups don't work; how do I fix this?
The BackupPC_dump command has a -v option, so the easiest way to debug backup problems on a specific host is to run BackupPC_dump manually as the BackupPC user:
su __BACKUPPCUSER__ __INSTALLDIR__/bin/BackupPC_dump -v -f hostName
This will run a full dump on hostName (replace with your host name) and will print all the output from each command, including the log output.
The most likely problems will relate to connecting to the smb shares on each host. On each failed backup, a file __TOPDIR__/pc/$host/XferLOG.bad.z will be created. This is the stderr output from the transport program. You can view this file via the CGI interface, or manually uncompress it with;
__INSTALLDIR__/bin/BackupPC_zcat __TOPDIR__/pc/$host/XferLOG.bad.z | more
The first line will show the full command that was run (eg: rsync, tar or smbclient). Based on the error messages you should figure out what is wrong. Possible errors on the server side are invalid host, invalid share name, bad username or password. Possible errors on the client side are misconfiguration of the share, username or password.
You should try running the command manually to see what happens. For example, for smbclient you should it manually and verify that you can connect to the host in interactive mode, eg:
smbclient '\\hostName\shareName' -U userName
shareName should match the $Conf{SmbShareName} setting and userName should match the the $Conf{SmbShareUserName} setting.
You will be prompted for the password. You should then see this prompt:
smb: \>
Verify that ``ls'' works and then type ``quit'' to exit.
#################################################
sudo tar --preserve-permissions --preserve-order --verbose -x -f pps.tar
References:
http://backuppc.sourceforge.net/faq/BackupPC.html
http://backuppc.sourceforge.net/faq/debugXfer.html
http://adsm.org/lists/html/BackupPC-users/2010-04/msg00229.html
his
To copy a complete store (ie: /var/lib/backuppc) using BackupPC_tarPCCopy you should:
- stop BackupPC so that the store is static.
- copy the cpool, conf and log directory trees using any technique (like cp, rsync or tar) without the need to preserve hardlinks.
- copy the pc directory using BackupPC_tarPCCopy:
su backuppc cd NEW_TOPDIR mkdir pc cd pc /usr/share/backuppc/bin/BackupPC_tarPCCopy /var/lib/backuppc/pc | tar xvPf -
irri@backuppc2:/usr/share$ locate BackupPC_zipCreate
/usr/share/backuppc/bin/BackupPC_zipCreate
¬¬~
sudo Backuppc_zipCreate -h virriadfs -n -1 -c 3 "-s f /gis1" > /home/irri/gis1.zip
sudo /usr/share/backuppc/bin/BackupPC_zipCreate -h virriadfs -n -1 -c 3 "-s f /gis1" > /home/irri/gis1.zip
/usr/share/backuppc/bin/BackupPC_zipCreate -h virriadfs -n -1 -c 3 "-s f /gis1" > gis1.zip
/usr/share/backuppc/bin/BackupPC_zipCreate -h virriadfs -n -1 -c 3 -s gis1 / > /tmp/gis1.zip
/usr/share/backuppc/bin/BackupPC_zipCreate -h irriad1 -n -2 -c 3 -s elyt / > /tmp/elyt.zip
/usr/share/backuppc/bin/BackupPC_zipCreate -h virriadfs -n -1 -c 3 -s abcd / > /tmp/abcd.zip
/var/lib/backuppc/pc/virriadfs/94/fF$/fGIS1
/usr/share/backuppc/bin/BackupPC_tarCreate -h virriadfs -n -189 -s "fF$/fGIS1 /" > /tmp/gis1.tar
/usr/share/backuppc/bin/BackupPC_tarCreate -h virriad1 -n -189 -s / / > /tmp/gis1.tar
Conf{SmbClientIncrCmd} = '$smbClientPath \\\\irriad1\\elyt'
/usr/share/backuppc/bin/BackupPC_tarCreate -t -h virriadfs -n 94 -s F$ / > /tmp/gis1.tar
/usr/share/backuppc/bin/BackupPC_tarCreate -h virriadfs -n 90 -s F$ / > /var/lib/backuppc/nanie/pps.tar
500 sudo su -
501 cd /var/lib
502 ls
503 ls -lah
504 history
505 history | grep chown
506 sudo chown backuppc backuppc/
507 history | grep init.d
508 history | grep ps
509 ps aux|grep backuppc
510 history | grep ps
511 history | grep init.d
512 sudo /etc/init.d/backuppc stop
513 history | grep config
514 cd /etc/baackuppc
515 cd /etc
516 cd backuppc
517 ls -lah
518 ls -lah con*
519 cp -Rf config.pl config.org
520 sudo cp -Rf config.pl config.org
521 ls -lah con*
522 history | grep init.d
523 sudo /etc/init.d/backuppc start
524 history
irri@backuppc2:/etc/backuppc$
Friday, November 13, 2015
My New Pal in Scripting World "PLINK"
My New Pal in Scripting World "PLINK"
example: Tested working:
C:\>echo y | plink -v root@ACCesxvmh79 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmhdr54 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmhdr53 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmhdr51 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmhdr52 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh24 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh25 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh22 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh26 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh27 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh28 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh30 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh29 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh33 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh32 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh11 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh12 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh13 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh34 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh19 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh20 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh14 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh15 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmhdr55 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh23 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
s /ISO_REPO"
echo y | plink -v root@ACCesxvmhdr53 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmhdr51 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmhdr52 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh24 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh25 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh22 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh26 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh27 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh28 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh30 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh29 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh33 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh32 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh11 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh12 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh13 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh34 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh19 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh20 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh14 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh15 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmhdr55 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
echo y | plink -v root@ACCesxvmh23 -pw 8ullshit "esxcfg-nas -a ISO_REPO -o 10.101.8.66 -s /ISO_REPO"
s /ISO_REPO"
Thursday, November 12, 2015
Subscribe to:
Posts (Atom)