Project

General

Profile

IBackup for linux » History » Version 1

Jamila Khan, 02/25/2016 01:37 PM

1 1 Jamila Khan
h1. IBackup for linux
2
3
h2. installing and configuring IBackup perl scripts
4
5
<pre>
6
cd /usr/local/sbin
7
wget http://evs.ibackup.com/download/download-for-linux/IBackup_for_Linux.zip
8
unzip IBackup_for_Linux.zip
9
cd IBackup_for_Linux
10
chmod a+x *.pl
11
./Account_Settings.pl
12
</pre>
13
14
Enter your
15
* username
16
* password
17
* key
18
* backup location (defaults to hostname)
19
* restore location (they recommend using @/home/@)
20
* restore from location (defaults to hostname)
21
* email ID
22
* retain logs? YES
23
24
!https://www.ibackup.com/source/images/ibackup-account-settings-new.jpg!
25
26
It asks if you want to log in, say yes.
27
28
h2. setting up backupninja jobs
29
30
<pre>
31
cd /etc/backup.d
32
</pre>
33
34
create 56-iBackup.sh with contents:
35
36
<pre>
37
#!/bin/sh
38
39
cd /usr/local/sbin/IBackup_for_Linux/
40
41
OUTPUT=$((
42
43
/usr/local/sbin/IBackup_for_Linux/Backup_Script.pl
44
45
) 2>&1)
46
47
if [ $? -ne 0 ]
48
then
49
warning $OUTPUT
50
fi
51
</pre>
52
53
create 57-iBackup_test.sh
54
remember to change the path to include your username
55
56
<pre>
57
#!/bin/sh
58
59
OUTPUT=$((
60
61
## YOU MUST CHANGE THIS TO REFLECT THE LOCAL PATH
62
path="/usr/local/sbin/IBackup_for_Linux/palantetech/LOGS" 
63
64
# declare variables for checking the timestamp against
65
today=`date "+%a %b %e"`
66
yesterday=`date -d "yesterday" "+%a %b %e"`
67
cnt=`ls -l $path |grep "$today\|$yesterday"| wc -l`
68
69
# find if there are errors
70
errorcnt=`find $path -name **"$yesterday"** -exec cat {} \; | grep "Total files failed to backup" | cut -d ' ' -f 7`
71
errors=`find $path -name **"$yesterday"** -exec cat {} \; | grep -A 6 "ADDITIONAL INFORMATION"`
72
73
# for testing
74
#echo -e "$today \n $yesterday \n $cnt \n $errorcnt \n $errors" 
75
76
if [ $cnt -eq 0 ] ; then
77
  echo "CRITICAL - A backup did not run on $yesterday!" 
78
  exit 2
79
fi
80
81
if [ $errorcnt -ne 0 ] ; then
82
  echo "CRITICAL - Errors in backup!\n$errors" 
83
  exit 2
84
fi
85
86
echo -e "OK - Backup ran $yesterday with no errors" 
87
exit 0
88
89
) 2>&1)
90
91
if [ $? -ne 0 ]
92
then
93
warning $OUTPUT
94
fi
95
</pre>
96
97
98
Developed from
99
https://www.ibackup.com/online-backup-linux/readme.htm
100
https://hq.palantetech.coop/issues/25142
Go to top