Project

General

Profile

IBackup for linux » History » Version 2

Jamila Khan, 02/25/2016 01:40 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 2 Jamila Khan
It then asks if you want to log in, say yes.
27
28
* Add the list of files to back up to BackupsetFile.txt
29
* Add the list of files to exclude to FullExcludeList.txt, PartialExcludeList.txt, and/or RegexExcludeList.txt, depending on how you want to exclude them.
30 1 Jamila Khan
31
h2. setting up backupninja jobs
32
33
<pre>
34
cd /etc/backup.d
35
</pre>
36
37
create 56-iBackup.sh with contents:
38
39
<pre>
40
#!/bin/sh
41
42
cd /usr/local/sbin/IBackup_for_Linux/
43
44
OUTPUT=$((
45
46
/usr/local/sbin/IBackup_for_Linux/Backup_Script.pl
47
48
) 2>&1)
49
50
if [ $? -ne 0 ]
51
then
52
warning $OUTPUT
53
fi
54
</pre>
55
56
create 57-iBackup_test.sh
57
remember to change the path to include your username
58
59
<pre>
60
#!/bin/sh
61
62
OUTPUT=$((
63
64
## YOU MUST CHANGE THIS TO REFLECT THE LOCAL PATH
65
path="/usr/local/sbin/IBackup_for_Linux/palantetech/LOGS" 
66
67
# declare variables for checking the timestamp against
68
today=`date "+%a %b %e"`
69
yesterday=`date -d "yesterday" "+%a %b %e"`
70
cnt=`ls -l $path |grep "$today\|$yesterday"| wc -l`
71
72
# find if there are errors
73
errorcnt=`find $path -name **"$yesterday"** -exec cat {} \; | grep "Total files failed to backup" | cut -d ' ' -f 7`
74
errors=`find $path -name **"$yesterday"** -exec cat {} \; | grep -A 6 "ADDITIONAL INFORMATION"`
75
76
# for testing
77
#echo -e "$today \n $yesterday \n $cnt \n $errorcnt \n $errors" 
78
79
if [ $cnt -eq 0 ] ; then
80
  echo "CRITICAL - A backup did not run on $yesterday!" 
81
  exit 2
82
fi
83
84
if [ $errorcnt -ne 0 ] ; then
85
  echo "CRITICAL - Errors in backup!\n$errors" 
86
  exit 2
87
fi
88
89
echo -e "OK - Backup ran $yesterday with no errors" 
90
exit 0
91
92
) 2>&1)
93
94
if [ $? -ne 0 ]
95
then
96
warning $OUTPUT
97
fi
98
</pre>
99
100
101
Developed from
102
https://www.ibackup.com/online-backup-linux/readme.htm
103
https://hq.palantetech.coop/issues/25142
Go to top