Project

General

Profile

IBackup for linux » History » Version 5

Jamila Khan, 09/16/2016 12:53 PM
adding select backup type mirror

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