OXIESEC PANEL
- Current Dir:
/
/
home
/
cubot
/
bin
/
utils
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/03/2023 08:06:37 AM
rwxr-xr-x
📄
.auditreport.sh.swp
12 KB
02/03/2023 07:34:08 AM
rw-r--r--
📄
CollectReportData.sh
2.17 KB
02/03/2023 07:34:08 AM
rwxr-xr-x
📄
ComapreCubotTableData.sh
1.06 KB
02/03/2023 07:34:08 AM
rwxr-xr-x
📄
VBox.sh
1.59 KB
02/03/2023 07:34:08 AM
rw-r--r--
📄
auditreport.sh
1.35 KB
02/03/2023 07:34:08 AM
rwxr-xr-x
📄
cleanSRCid.sql
386 bytes
02/03/2023 07:34:08 AM
rw-r--r--
📄
cleancache.sh
8.89 KB
02/03/2023 07:34:08 AM
rwxr-xr-x
📄
compare_database.sh
148 bytes
02/03/2023 07:34:08 AM
rwxr-xr-x
📄
compressCSS.sh
262 bytes
02/03/2023 07:34:08 AM
rwxr-xr-x
📄
compressJS.sh
251 bytes
02/03/2023 07:34:08 AM
rwxr-xr-x
📄
cubbackup.sh
1.43 KB
02/03/2023 07:34:08 AM
rwxr-xr-x
📄
cubbackup_sync.sh
314 bytes
02/03/2023 07:34:08 AM
rwxr-xr-x
📄
cubmonitor.sh
3.77 KB
02/03/2023 07:34:08 AM
rwxr-xr-x
📄
cubotmail
29.64 KB
02/03/2023 07:34:08 AM
rwxr-xr-x
📄
esalesforce.pl
1.87 KB
02/03/2023 07:34:08 AM
rw-r--r--
📄
etl_xform_template.sh
543 bytes
02/03/2023 07:34:08 AM
rwxr-xr-x
📄
killrunaway.sh
609 bytes
02/03/2023 07:34:08 AM
rwxr-xr-x
📄
migrateSharedreports.sh
1.14 KB
02/03/2023 07:34:08 AM
rw-r--r--
📄
mysql2pgsql.perl
40.98 KB
02/03/2023 07:34:08 AM
rwxr-xr-x
📄
removenewlinechar.awk
292 bytes
02/03/2023 07:34:08 AM
rw-r--r--
📄
removenewlinechar.pl
534 bytes
02/03/2023 07:34:08 AM
rw-r--r--
📄
removenewlinechar2.awk
82 bytes
02/03/2023 07:34:08 AM
rw-r--r--
📄
renameCubUser.sh
2.38 KB
02/03/2023 07:34:08 AM
rw-r--r--
📄
sendmail.pl
2.13 KB
02/03/2023 07:34:08 AM
rwxr-xr-x
📄
updatealldb.sh
1.08 KB
02/03/2023 07:34:08 AM
rw-r--r--
📄
yuicompressor-2.4.6.jar
832.85 KB
02/03/2023 07:34:08 AM
rwxr-xr-x
📄
zap
1.86 KB
02/03/2023 07:34:08 AM
rwxr-xr-x
Editing: cubbackup.sh
Close
#!/bin/sh #Main backup directory backup=/home/cubot/backup/ #List databases for full backup: full_db[0]=demo_mutual2 #full_db[1]=reference #List databases for Cubot tables only: cubot_db[0]=demo_mutual2 cubot_db[1]=demo_mutual1 #List path of etl dir to be included in backup: etldir=/home/cubot/etl/ ################################################## year=`date +%Y` day=`date +%j` full_db_path=${backup}/year${year}/${year}_full_db/ cubot_db_path=${backup}/year${year}/${year}_cubot_db/ etl_path=${backup}/year${year}/${year}_etl/ #Dynamic creation of directries mkdir -p ${full_db_path} mkdir -p ${cubot_db_path} mkdir -p ${etl_path} #Full databases for (( i = 0 ; i < ${#full_db[@]} ; i++ )) do echo "Taking Full DB mysqldump for ${full_db[$i]}" mysqldump ${full_db[$i]} -ef | gzip > ${full_db_path}/${day}_${full_db[$i]}_full.mysqldump.gz echo "Full DB Done ${full_db[$i]}" done #Cubot tables only for (( i = 0 ; i < ${#cubot_db[@]} ; i++ )) do echo "Taking CUBOT Backup mysqldump for ${full_db[$i]}" mysqldump ${cubot_db[$i]} -ef `/home/cubot/bin/cubmenuserv -t | sort | uniq | grep -v data_xy` | gzip > ${cubot_db_path}/${day}_${cubot_db[$i]}_cubot.mysqldump.gz echo "CUBOT Backup Done ${full_db[$i]}" done #ETL direcory echo "Taking backup of ${etldir}" #tar cvzf ${etl_path}/${day}_etl.tgz ${etldir} ###### Added two new commands to delete old backups ############### # cd ${backup}/year${year}/ # find *.*gz -ctime +14 -exec rm -f {} \;