-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathdelete_firebird_backup.sh
37 lines (28 loc) · 1.03 KB
/
delete_firebird_backup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
#==============================================
# Backup Database Firebird Linux
# Author: Wanderlei Hüttel
# Email: [email protected]
# Version: 1.0 - 04/12/2018
#==============================================
#==============================================
# Date/time when script starts
#==============================================
# Config
rootFolder="/firebird" # Root folder of firebird database
backupFolder="${rootFolder}/backup" # Backup Folder
fbBackup="database.fbk" # Backup file (.fbk)
fbLog="database.log" # Log file (.log)
#==============================================
# Verify if firebird dump and firebird log already exists in backup folder and exclude them
file1="${backupFolder}/${fbBackup}";
file2="${backupFolder}/${fbLog}";
if [ -f ${file1} ]; then
\rm ${file1}
echo "Arquivo ${file1} excluido com sucesso!"
fi
if [ -f ${file2} ]; then
\rm ${file2}
echo "Arquivo ${file2} excluido com sucesso!"
fi
exit 0