#/** * @package Akismet */ /* Plugin Name: Akismet Anti-spam: Spam Protection Plugin URI: https://akismet.com/ Description: Used by millions, Akismet is quite possibly the best way in the world to protect your blog from spam. Akismet Anti-spam keeps your site protected even while you sleep. To get started: activate the Akismet plugin and then go to your Akismet Settings page to set up your API key. Version: 5.4 Requires at least: 5.8 Requires PHP: 7.2 Author: Automattic - Anti-spam Team Author URI: https://automattic.com/wordpress-plugins/ License: GPLv2 or later Text Domain: akismet */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Copyright 2005-2025 Automattic, Inc. */ // Make sure we don't expose any info if called directly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
| Server IP : 62.109.13.187 / Your IP : 216.73.216.11 [ Web Server : Apache/2.4.6 (CentOS) mpm-itk/2.4.7-04 OpenSSL/1.0.2k-fips PHP/8.2.28 System : Linux robothost.ru 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : mosrembit ( 6064) PHP Version : 8.2.28 Disable Function : NONE Domains : 0 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /lib/Acronis/BackupAndRecovery/ |
Upload File : |
#!/bin/bash
# This is Acronis Linux Report Utility. It's absolutely harmless for your
# system and security. Please run this utility under privileged user and
# send us resulted sysinfo archive from /var/lib/Acronis/sysinfo directory.
# Copyright (C) Acronis, 2010
# Initially written by Fadeeva Marina
# (marian.fadeeva@acronis.com)
var_dir=/var
opt_dir=/opt
usr_local_dir=/usr/local
rpm_dist=/bin/rpm
dpkg_dist=/usr/bin/dpkg
zypper_dist=/usr/bin/zypper
libdir=/usr/lib/Acronis
dkms_dir=/var/lib/dkms
var_dir=/var/lib/Acronis
var_log_dir=/var/log/Acronis
aties=$libdir/Agent/agent
abr=$libdir/BackupAndRecoveryAgent
atiesecho=$libdir/Agent/acronisagent
abrams=$libdir/AMS/ManagementServer
online_backup_dir=$var_dir/BackupAndRecovery/OnlineBackup
psa_mod_acronis_dir=psa/var/modules/acronis-backup/srv/
cpanel_3rdparty_dir=cpanel/base/3rdparty/acronisbackup
opt_etc_dir=$opt_dir/acronis/etc
opt_var_dir=$opt_dir/acronis/var
opt_var_log_dir=$opt_var_dir/log
# collect full contents from
specific_dirs="/var/lib/alsdb $var_dir/CurlCaCertificates $var_dir/BackupAndRecovery/MMS/Activity
$var_dir/BackupAndRecovery/MMS/AccessVault $var_dir/AMS/AccessVault
$var_dir/Scheduler/tasks /ConfigurationFiles $var_dir/vix_disk_lib"
specific_dirs_media="/ConfigurationFiles"
# collect all the Acronis databases (-shm and -wal files will be colleceted as well)
db3_ext_templates="sqlite sqlite3 db db3"
db3_dirs="$var_dir $libdir"
# collect logs from
logs_files_exts="log log.gz output trace stat"
logs_dirs="$var_log_dir $var_dir $opt_var_log_dir"
# collect standard errors\output from
stdout_files="stderr stdout"
stdout_dirs="$var_log_dir $opt_var_log_dir"
# collect conf files from
conf_files_exts="config meta ini sh csv xml sql yaml yml json"
conf_dirs="/etc/Acronis $var_dir $opt_etc_dir $opt_var_dir/dsp.database.pg"
procfiles="version cmdline interrupts modules bus/pci/devices bus/usb/devices partitions scsi/scsi
mounts cpuinfo meminfo mdstat devices bus/input/devices swaps fb slabinfo"
slabfiles="objects object_size objs_per_slab order slabs slab_size"
df_options="-hT"
ver=""
ver2=""
export LANG=C
# Parse options
script_name="$0"
silent_mode="0"
is_dir_mode="0"
ensure_root="1"
default_tgtdir="/var/lib/Acronis/sysinfo"
syslog_tgtdir="syslog"
default_filename=sysinfo-$(date +%Y.%m.%d-%H.%M.%S).tar.bz2
filename=$default_filename
services_files_usr="/usr/sbin/dkms
/usr/sbin/acropsh
/usr/sbin/acronis_ams
/usr/sbin/acronis_asm
/usr/sbin/acronis_zmqgw
/usr/sbin/acronis_dml2tm
/usr/sbin/acrocmd
/usr/sbin/aakore
/usr/sbin/acronis_rsm
/usr/sbin/acronis_encrypt
/usr/sbin/acronis_mms
/usr/sbin/acronis_schedule
/usr/sbin/schedmgr
/usr/sbin/tibxread
/usr/sbin/mediabuilder
/usr/sbin/trueimagemnt
/usr/sbin/acronis_apply_device_filter
/usr/sbin/acronis_setup_device_filter
/usr/sbin/acronis_monitoring_collector
/usr/sbin/acronis_monitoring_service
/usr/sbin/acronis_patch_management
/usr/sbin/acronis_notification_service"
services_files_etc="/etc/systemd/system/acronis_device_filter.service
/etc/systemd/system/acronis_monitoring_service.service
/etc/systemd/system/acronis_ams.service
/etc/systemd/system/acronis_asm.service
/etc/systemd/system/acronis_zmqgw.service
/etc/systemd/system/aakore.service
/etc/systemd/system/acronis_mms.service
/etc/systemd/system/acronis_rsm.service
/etc/systemd/system/acronis_schedule.service"
services_files_dir=services_files
services_files_etc_ext="rpmnew rpmsave"
loader_configs_dir="loader_configs"
umask 0077
while [ "$#" -gt 0 ]; do
case "$1" in
-h|--help)
echo "Acronis Report Utility"
echo ""
echo "EXAMPLES"
echo " Save sysinfo into $default_tgtdir/$default_filename:"
echo " $script_name"
echo ""
echo " Save sysinfo into specified directory:"
echo " $script_name --target_dir path/to/report/dir"
echo ""
echo " Save compressed sysinfo into specified file:"
echo " $script_name --target_file path/to/report/archive.tar.bz2"
echo " (path can be absolute or relative to $default_tgtdir)"
echo ""
echo " Print this help and exit:"
echo " $script_name --help"
echo ""
exit 0
;;
--silent)
silent_mode="1"
shift
;;
--skip_root_check)
ensure_root="0"
shift
;;
--target_file)
is_dir_mode="0"
if [ "$#" -lt 2 ]; then
>&2 echo "ERROR: value of $1 option is not specified"
>&2 echo ""
exit 1
fi
filename=$2
shift 2
;;
--target_dir)
is_dir_mode="1"
if [ "$#" -lt 2 ]; then
>&2 echo "ERROR: value of $1 option is not specified"
>&2 echo ""
exit 1
fi
filename=$2
shift 2
;;
*)
>&2 echo "Unexpected argument $1"
>&2 echo "Run $0 --help to get usage examples"
exit 1
;;
esac
done
case $filename in
/*) result_abs_path="$filename" ;;
*) result_abs_path="$default_tgtdir/$filename" ;;
esac
# location of intermediary data
if [ "$is_dir_mode" -eq "1" ]; then
work_dir="$result_abs_path"
else
work_dir=$default_tgtdir/logs
fi
# make sure script is run by root
if [ -x /bin/asamba ]; then
# this is media version. No need to check if run by root
df_options="-h"
specific_dirs="$specific_dirs $specific_dirs_media"
else
if [ "$ensure_root" -eq "1" ]; then
is_root="0"
test -x /usr/bin/id && is_root="$(/usr/bin/id -u)"
if [ "$is_root" -ne "0" ] ; then
>&2 echo You must be root to run this script!
exit 1
fi
fi
fi
# switch into working directory and start collecting sysinfo
if [ "$silent_mode" -eq "0" ]; then
echo Please wait for a while ...
fi
mkdir -p $work_dir
cd $work_dir
mkdir -p $syslog_tgtdir
if [ -x /bin/uname ]; then
ver=/lib/modules/`/bin/uname -r`/kernel/drivers/block/snapapi*
ver2=/lib/modules/`/bin/uname -r`/kernel/drivers/extra/snapapi*
fi
# Start from checking kernel version and setting
# proprer snapapi module name
if [ -x /bin/uname ]; then
/bin/uname -r | grep "2.4" > /dev/null
if [ "$?" -eq "0" ]; then
snapapi_ver=snapapi # it's 2.4 kernel
else
snapapi_ver=snapapi26 # it's 2.6 or upper kernel
fi
fi
# collect the services files of product
mkdir $services_files_dir
for f in $services_files_usr
do
if [ -r $f ]; then
cp --parents $f $services_files_dir/ 2>&1
fi
done
for f in $services_files_etc
do
if [ -r $f ]; then
cp --parents $f $services_files_dir/ 2>&1
for ext in $services_files_etc_ext
do
if [ -r $f.$ext ]; then
cp --parents $f.$ext $services_files_dir/ 2>&1
fi
done
fi
done
# get the logs of last attempt to compile snapapi module.
if [ -d "$dkms_dir/$snapapi_ver" ]; then
cp -u `find $dkms_dir/$snapapi_ver -name make.log | xargs ls -t | head -1` \
snapapi_make.log 2>&1
fi
# get the logs of last attempt to compile file_protector module.
if [ -d "$dkms_dir/file_protector" ]; then
cp -u `find $dkms_dir/file_protector -name make.log | xargs ls -t | head -1` \
file_protector_make.log 2>&1
fi
if [ -r /etc/ProductVersion.conf ]; then
cp /etc/ProductVersion.conf ProductVersion.conf 2>&1
fi
if [ -r /etc/config ]; then
cp /etc/config etc_config 2>&1
fi
if [ -r /etc/hosts ]; then
cp /etc/hosts hosts.txt 2>&1
fi
if [ -r /usr/lib/Acronis/BackupAndRecovery_version.txt ]; then
cp /usr/lib/Acronis/BackupAndRecovery_version.txt ProductVersion.conf 2>&1
else
if [ -r /var/lib/Acronis/BackupAndRecovery_version.txt ]; then
cp /var/lib/Acronis/BackupAndRecovery_version.txt ProductVersion.conf 2>&1
fi
fi
# Common for all versions
if [ -x /usr/sbin/acrocmd ]; then
#Live Linux
/usr/sbin/acrocmd list disks > acrocmd.txt 2>&1
elif [ -x /bin/acrocmd ]; then
/bin/acrocmd list disks > acrocmd.txt 2>&1
elif [ -x /usr/sbin/trueimagecmd ]; then
#Live Linux
/usr/sbin/trueimagecmd --list > trueimagecmd.txt 2>&1
elif [ -x /bin/trueimagecmd ]; then
/bin/trueimagecmd --list > trueimagecmd.txt 2>&1
fi
# Gather information about dsk_supp state
# should be done before $logs_dirs are gathered because it writes additional debug logs
if [ -x /usr/lib/Acronis/BackupAndRecovery/dsk_supp_test ]; then
DSK_DSK__LOG=1 /usr/lib/Acronis/BackupAndRecovery/dsk_supp_test > dsk_supp_test.txt 2>&1
elif [ -x /bin/dsk_supp_test ]; then
DSK_DSK__LOG=1 /bin/dsk_supp_test > dsk_supp_test.txt 2>&1
fi
# save /tmp/asamba.log if exist
if [ -r /tmp/asamba.log ]; then
cp /tmp/asamba.log . 2>&1
fi
# save all logs from /var/log/asamba
if [ -d /var/log/asamba ]; then
cp /var/log/asamba/* .
fi
# Schedmgr report
if [ -x $libdir/Schedule/schedmgr-bin ]; then
$libdir/Schedule/schedmgr-bin get report > schedmgr_report.txt 2>&1
fi
# Now check X-Server logs:
# Do we have xorg?
if [ -r /etc/X11/xorg.conf ]; then
cp /var/log/Xorg* ./$syslog_tgtdir/ 2>&1
# or is it XFree86?
elif [ -r /etc/X11/XF86Config ]; then
cp /var/log/XFree86* ./$syslog_tgtdir/ 2>&1
fi
# Common for all agents
if [ -x "$aties" ] || [ -x "$atiesecho" ]; then
/sbin/iptables -L > iptables.txt 2>&1
/sbin/lsmod | grep snapapi* > /dev/null
if [ "$?" -eq 0 ]; then
/sbin/rmmod $snapapi_ver > rmmod.txt 2>&1
fi
if [ -e "$ver" ] || [ -e "$ver2" ]; then
/sbin/modprobe $snapapi_ver
fi
fi # agents common
# For ATIES Linux agent 9.1
if [ -x "$aties" ]; then
/etc/init.d/acronis_trueimage_agent status > agent.txt 2>&1
fi
# For ATIES ECHO Linux agent
if [ -x "$atiesecho" ]; then
/etc/init.d/acronis_agent status > agent.txt 2>&1
fi
# For ABR Agent
if [ -x "$abr" ]; then
/etc/init.d/acronis_agent status > agent.txt 2>&1
/etc/init.d/acronis_mms status > mms.txt 2>&1
cp /etc/Acronis/BackupAndRecovery.config BackupAndRecovery.config 2>&1
fi
# For ABR AMS
if [ -x "$abrams" ]; then
/etc/init.d/acronis_ams status > ams.txt 2>&1
cp /etc/Acronis/AMS.config AMS.config 2>&1
#dump PostgreSQL database
# disabled as most installations use sqlite database and it is collected.
#
# pg_dump acronis_cms -Fc | gzip > acronis_cms.gz
fi
if [ -f "/tmp/AcronisAMS.log" ]; then
mkdir -p tmp 2>&1
cp /tmp/AcronisAMS.log tmp 2>&1
fi
if [ -f "/tmp/AcronisMMS.log" ]; then
mkdir -p tmp 2>&1
cp /tmp/AcronisMMS.log tmp 2>&1
fi
# Then gather system information
# Some systems have kernel config in /proc/. Let's save it
if [ -r /proc/config.gz ]; then
gunzip /proc/config.gz . 2>&1
mv config proc_config 2>&1
fi
if [ -x /usr/bin/vmstat ]; then
/usr/bin/vmstat 10 6 > vmstat.txt 2>&1
elif [ -x /bin/vmstat ]; then
/bin/vmstat 10 6 > vmstat.txt 2>&1
fi
/sbin/fdisk -l > fdisk.txt 2>&1
if [ -r /etc/issue ]; then
cp /etc/issue issue.txt 2>&1
fi
if [ -r /etc/os-release ]; then
cp /etc/os-release os-release.txt 2>&1
fi
if [ -x /usr/sbin/gdisk ] || [ -x /bin/gdisk ]; then
for i in `cat /proc/partitions | awk '{print $4}' | grep -v [0-9]`; do
if [ -e "/dev/$i" ]; then
# Use echo to avoid gdisk questions. Details in ABR-152465
echo 1 | gdisk -l /dev/$i >> gdisk.txt 2>&1
fi
done
fi
if [ -r /etc/resolv.conf ]; then
cp /etc/resolv.conf resolv.txt 2>&1
fi
if [ -x /bin/uname ]; then
/bin/uname -a > uname.txt 2>&1
fi
#just in case we're on GPT system
if [ -x /sbin/parted ]; then
parted -sl > parted.txt 2>&1
fi
if [ -x /bin/lsblk ]; then
/bin/lsblk > lsblk.txt 2>&1
fi
if [ -x /usr/bin/stratis ]; then
echo "$ /usr/bin/stratis pool" > stratis.txt
/usr/bin/stratis pool >> stratis.txt 2>&1
echo "$ /usr/bin/stratis blockdev" >> stratis.txt
/usr/bin/stratis blockdev >> stratis.txt 2>&1
echo "$ /usr/bin/stratis filesystem" >> stratis.txt
/usr/bin/stratis filesystem >> stratis.txt 2>&1
fi
#Creating summary.txt file with general system information
echo `date` >> summary.txt 2>&1
for i in $procfiles
do
if [ -r /proc/$i ]; then
echo "$ cat /proc/$i" >> summary.txt
cat /proc/"$i" >> summary.txt 2>&1
fi
done
echo "$ blockdev --report" >> summary.txt
blockdev --report >> summary.txt 2>&1
for sdir in `find /sys/kernel/slab -name snapapi_blk_*` ;
do
echo $sdir >> snapapi_slabs.txt 2>&1
for sfile in $slabfiles
do
if [ -r "$sdir/$sfile" ]; then
echo "$ cat $sdir/$sfile" >> snapapi_slabs.txt
cat "$sdir/$sfile" >> snapapi_slabs.txt 2>&1
fi
done
echo >> snapapi_slabs.txt 2>&1
done
if [ -x /bin/dmesg ]; then
/bin/dmesg > ./$syslog_tgtdir/dmesg.txt 2>&1
if [ ! -x /bin/acronis ]; then
/bin/dmesg -T > ./$syslog_tgtdir/dmesg-datetime.txt 2>&1
fi
fi
# copy dmesg saved right after system startup
if [ -r /var/log/dmesg ]; then
cp /var/log/dmesg ./$syslog_tgtdir/ 2>&1
fi
# configuration of software RAID
dmraid_cmd=`which dmraid 2>/dev/null`
if [ -n "$dmraid_cmd" ]; then
$dmraid_cmd -rD > /dev/null 2>&1
$dmraid_cmd -n > dmraid_n.txt 2>&1
$dmraid_cmd -r > dmraid.txt 2>&1
fi
if [ -x /usr/sbin/dkms ]; then
/usr/sbin/dkms status > dkms.txt 2>&1
fi
if [ -r /var/log/trueimage-setup.log ]; then
cp /var/log/trueimage-setup.log . 2>&1
fi
if [ -r /etc/fstab ]; then
cp /etc/fstab . 2>&1
fi
if [ -r /var/log/messages ]; then
cp /var/log/messages* ./$syslog_tgtdir/ 2>&1
fi
if [ -r /var/log/syslog ]; then
cp /var/log/syslog* ./$syslog_tgtdir/ 2>&1
fi
# for systemd-based systems collect journal logs for the last month
if which journalctl >/dev/null 2>&1; then
journalctl --no-pager -a --since=-1month > ./$syslog_tgtdir/journalctl.txt 2>&1
fi
# Ubuntu saves kernel log to kern.log unstead of messages
if [ -r /var/log/kern.log ]; then
cp /var/log/kern.log ./$syslog_tgtdir/ 2>&1
fi
if [ -x /bin/getmeta ]; then
# let's call it first
/bin/getmeta
cp /tmp/*.hex .
cp /tmp/*.dd .
fi
bin_path_prefix="/usr"
# save logs from /tmp when on media
if [ -x /bin/acronis ]; then
cp /tmp/*.log .
cp /tmp/*.log.?.gz .
bin_path_prefix=""
else
cp /tmp/*_asan.log . 2>/dev/null
fi
# collect routing information
routing_filename="routing.txt"
echo "routing information:" > $routing_filename
if [ -x $bin_path_prefix/bin/netstat ]; then
echo -e "\n\n>\$netstat -rn" >> $routing_filename
$bin_path_prefix/bin/netstat -rn >> $routing_filename
fi
if [ -x $bin_path_prefix/sbin/route ]; then
echo -e "\n\n>\$route -n" >> $routing_filename
$bin_path_prefix/sbin/route -n >> $routing_filename
fi
if [ -x $bin_path_prefix/sbin/ip ]; then
echo -e "\n\n>\$ip route" >> $routing_filename
$bin_path_prefix/sbin/ip route >> $routing_filename
fi
if [ -x /sbin/lspci ]; then
/sbin/lspci -m -vvv > lspci.txt 2>&1
elif [ -x /bin/lspci ]; then
/bin/lspci -m -vvv > lspci.txt 2>&1
fi
if [ -d /boot ]; then
cp /boot/config* . 2>&1
ls -lR /boot > boot.txt 2>&1
fi
if [ -x /sbin/ifconfig ]; then
/sbin/ifconfig -a > ifconfig.txt 2>&1
elif [ -x /bin/ifconfig ]; then
/bin/ifconfig -a > ifconfig.txt 2>&1
fi
if [ -x /usr/bin/gcc ]; then
/usr/bin/gcc -v > gcc.txt 2>&1
fi
if [ -r /etc/TZ ]; then
(cat /etc/TZ && date -u && date) > timezone.txt 2>&1
else
( date -u && date) > timezone.txt 2>&1
fi
ps auxfww > ps.txt 2>&1
if [ "X$?" = "X1" ]; then
#ps in Bootable Media supports only "w" mode
ps w > ps.txt 2>&1
fi
if [ -x /usr/bin/crontab ]; then
/usr/bin/crontab -l > crontab.txt 2>&1
fi
if [ -x /usr/sbin/dmidecode ]; then
/usr/sbin/dmidecode > dmidecode.txt 2>&1
elif [ -x /bin/dmidecode ]; then
/bin/dmidecode > dmidecode.txt 2>&1
fi
if [ -d /sys/class/scsi_host ]; then
find /sys/class/scsi_host -iname 'host*' -print -exec cat {}/proc_name \; > scsi_hosts.txt 2>&1
fi
df $df_options > df.txt 2>&1
df >> df.txt 2>&1
# Gather full contents of specified directoris
for abs_src_dir in $specific_dirs
do
if [ -d "$abs_src_dir" ]; then
tgt_dir=".$abs_src_dir"
mkdir -p "$tgt_dir"
for k in `ls -1 "$abs_src_dir"`; do cp -r "$abs_src_dir/$k" "$tgt_dir" ;done
fi
done
#Gather MMS and AMS databases
db3_files_exts=""
for ext in $db3_ext_templates
do
db3_files_exts="$db3_files_exts $ext $ext-shm $ext-wal"
done
for ext in $db3_files_exts
do
for abs_src_dir in `find $db3_dirs -name "*.$ext" -exec dirname {} \; | uniq`
do
case $abs_src_dir/ in
${work_dir}*)
# do not copy files already located in work_dir
;;
*/sysinfo-*)
# do not copy files from another sysinfo reports
;;
${var_dir}/mount*)
# do not copy files in "mount" dir which has mounted backups
;;
*)
mkdir -p ."$abs_src_dir"
for j in `ls -1 "$abs_src_dir" | grep "\.$ext$"`
do
cp -r "$abs_src_dir/$j" ."$abs_src_dir/$j"
done
;;
esac
done
done
#Gather Acronis logs
for ext in $logs_files_exts
do
for abs_src_dir in `find $logs_dirs -name "*.$ext" -exec dirname {} \; | uniq`
do
case $abs_src_dir/ in
${work_dir}*)
# do not copy files already located in work_dir
;;
*/sysinfo-*)
# do not copy files from another sysinfo reports
;;
${var_dir}/mount*)
# do not copy files in "mount" dir which has mounted backups
;;
*)
mkdir -p ."$abs_src_dir"
for j in `ls -1 "$abs_src_dir" | grep "\.$ext$"`
do
cp -r "$abs_src_dir/$j" ."$abs_src_dir/$j"
done
;;
esac
done
done
#Gather Acronis conf files
for ext in $conf_files_exts
do
for abs_src_dir in `find $conf_dirs -name "*.$ext" -exec dirname {} \; | uniq`
do
case $abs_src_dir/ in
${work_dir}*)
# do not copy files already located in work_dir
;;
*/sysinfo-*)
# do not copy files from another sysinfo reports
;;
${var_dir}/mount*)
# do not copy files in "mount" dir which has mounted backups
;;
*)
mkdir -p ."$abs_src_dir"
for j in `ls -1 "$abs_src_dir" | grep "\.$ext$"`
do
# exclude secure sensitive information from the Global.config
if [ "$j" == "Global.config" ]; then
secure_info_pattern="(<value\sname=\"Username|<value\sname=\"Password)"
grep -vwE $secure_info_pattern "$abs_src_dir/$j" > ."$abs_src_dir/$j"
else
cp -r "$abs_src_dir/$j" ."$abs_src_dir/$j"
fi
done
;;
esac
done
done
#Gather standard output\error files
for file in $stdout_files
do
for abs_src_dir in `find $stdout_dirs -name "$file" -exec dirname {} \; | uniq`
do
case $abs_src_dir/ in
${work_dir}*)
# do not copy files already located in work_dir
;;
*/sysinfo-*)
# do not copy files from another sysinfo reports
;;
${var_dir}/mount*)
# do not copy files in "mount" dir which has mounted backups
;;
*)
mkdir -p ."$abs_src_dir"
for j in `ls -1 "$abs_src_dir" | grep "$file"`
do
cp -r "$abs_src_dir/$j" ."$abs_src_dir/$j"
done
;;
esac
done
done
#Gather Virtual Appliance databse. It's not in Acronis dir, but has fixed name
virtapp_db="/var/lib/F4CEEE47-042C-4828-95A0-DE44EC267A28.db3"
if [ -r $virtapp_db ]; then
cp $virtapp_db ./var/lib/ 2>&1
fi
if [ -d $online_backup_dir ]; then
ls -lR $online_backup_dir > online_backup.txt
OPENSSL=/usr/bin/openssl
if [ -x $OPENSSL ]; then
for crt in `find $online_backup_dir -name '*.crt'`; do
echo "[$crt]" >> online_backup.txt
$OPENSSL x509 -in $crt -text -noout >> online_backup.txt 2>&1
done
fi
fi
list_logs="log config.ini acronis-backup-srv.db"
if [ -d $usr_local_dir/$psa_mod_acronis_dir ]; then
mkdir -p ./$psa_mod_acronis_dir
for var in $list_logs
do
cp -r $usr_local_dir/$psa_mod_acronis_dir/$var ./$psa_mod_acronis_dir 2>&1
done
elif [ -d $opt_dir/$psa_mod_acronis_dir ]; then
mkdir -p ./$psa_mod_acronis_dir
for var in $list_logs
do
cp -r $opt_dir/$psa_mod_acronis_dir/$var ./$psa_mod_acronis_dir 2>&1
done
fi
if [ -d $usr_local_dir/$cpanel_3rdparty_dir ]; then
mkdir -p ./$cpanel_3rdparty_dir
for var in config log update
do
cp -r $usr_local_dir/$cpanel_3rdparty_dir/$var ./$cpanel_3rdparty_dir
done
if [ -d $usr_local_dir/$cpanel_3rdparty_dir/srv ]; then
mkdir -p ./$cpanel_3rdparty_dir/srv
for var in $list_logs
do
cp -r $usr_local_dir/$cpanel_3rdparty_dir/srv/$var ./$cpanel_3rdparty_dir/srv 2>&1
done
fi
fi
if [ -e $usr_local_dir/cpanel/logs/error_log ]; then
mkdir -p ./cpanel/logs
cp $usr_local_dir/cpanel/logs/error_log ./cpanel/logs 2>&1
fi
# collect logs from vz containers
test -e /etc/parallels-release
if [ $? -eq 0 ]; then
list_logs="capture-data-config.sh capture-data.log freeze_mysql.sql"
for container in /vz/root/*
do
if [ -d $container/var/lib/Acronis/AgentCommData ]; then
mkdir -p ./$container
for var in $list_logs
do
if [ -f $container/var/lib/Acronis/AgentCommData/$var ]; then
cp -r $container/var/lib/Acronis/AgentCommData/$var ./$container 2>&1
fi
done
fi
done
fi
# SELINUX information
if [ -r /etc/selinux/config ]; then
/usr/sbin/sestatus > sestatus.txt 2>&1
fi
# LVM information
if [ -c /dev/mapper/control ]; then
dmsetup table > dmsetup_table.txt 2>&1
lvm pvdisplay -v > pvdisplay.txt 2>&1
lvm vgdisplay -v > vgdisplay.txt 2>&1
lvm lvdisplay -v > lvdisplay.txt 2>&1
fi
# multipath
if [ -r /dev/mpath ]; then
multipath -v 3 -ll > multipath.txt 2>&1
fi
# Then will gather information about installed pakages.
# Currently only for rpm and dpkg - based.
if [ -x "$rpm_dist" ]; then
/bin/rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n" \
> rpm_packages.txt 2>&1
fi
if [ -x "$dpkg_dist" ]; then
dpkg-query -W -f='${Package} ${Version} ${Architecture}\n' \
> dpkg_packages.txt 2>&1
fi
if [ -x "$zypper_dist" ]; then
zypper search -i > zypper_packages.txt 2>&1
fi
# Try to find loader's config file:
mkdir ./${loader_configs_dir}
legacy_boot_files="/boot/grub/menu.lst
/etc/lilo.conf"
for legacy_boot_path in ${legacy_boot_files}; do
if [ -r "${legacy_boot_path}" ]; then
cp "${legacy_boot_path}" ./${loader_configs_dir}/. 2>&1
fi
done
# Then GRUB configs
for grub_path in "grub" "grub2"; do
mkdir ./${loader_configs_dir}/${grub_path}
for ext in "cfg" "conf"; do
if [ -r /boot/${grub_path}/grub.${ext} ]; then
cp /boot/${grub_path}/grub.${ext} ./${loader_configs_dir}/${grub_path}/grub.${ext} 2>&1
fi
if [ -r /boot/${grub_path}/i386-pc/grub.${ext} ]; then
cp /boot/${grub_path}/i386-pc/grub.${ext} ./${loader_configs_dir}/${grub_path}/i386-pc_grub.${ext} 2>&1
fi
done
if [ -r /boot/${grub_path}/grubenv ]; then
cp /boot/${grub_path}/grubenv ./${loader_configs_dir}/${grub_path}/grubenv 2>&1
fi
if [ -r /boot/${grub_path}/i386-pc/grubenv ]; then
cp /boot/${grub_path}/i386-pc/grubenv ./${loader_configs_dir}/${grub_path}/i386-pc_grubenv 2>&1
fi
if [ -r /boot/${grub_path}/device.map ]; then
cp /boot/${grub_path}/device.map ./${loader_configs_dir}/${grub_path}/device.map 2>&1
fi
done
# grub editable configs
if [ -r /etc/default/grub ]; then
cp /etc/default/grub ./${loader_configs_dir}/etc_default_grub 2>&1
fi
if [ -r /etc/grub.d/debian ]; then
cp /etc/grub.d/debian ./${loader_configs_dir}/etc_debian_grub 2>&1
fi
if [ -r /etc/sysconfig/grub2 ]; then
cp /etc/sysconfig/grub2 ./${loader_configs_dir}/etc_sysconf_grub2 2>&1
fi
#
efi_configs="/boot/efi/EFI/ubuntu/grub.cfg
/boot/efi/EFI/debian/grub.cfg
/boot/efi/EFI/centos/grubx64.efi
/boot/efi/EFI/redhat/grubx64.efi"
# collect grub for efi-firmware:
for efi_conf_path in ${efi_configs}; do
if [ -r "${efi_conf_path}" ]; then
cp "${efi_conf_path}" ./${loader_configs_dir}/. 2>&1
fi
done
mkdir ./${loader_configs_dir}/efi_entries/
for grub_entries in /boot/efi/loader/entries/*; do
if [ -r "${grub_entries}" ]; then
cp "${grub_entries}" ./${loader_configs_dir}/efi_entries/. 2>&1
fi
done
mkdir ./${loader_configs_dir}/bios_entries/
for grub_entries in /boot/loader/entries/*; do
if [ -r "${grub_entries}" ]; then
cp "${grub_entries}" ./${loader_configs_dir}/bios_entries/. 2>&1
fi
done
# gather some files for VZ
if [ -r /etc/vz/vz.conf ]; then
cp /etc/vz/vz.conf . 2>&1
fi
if [ -r /etc/parallels-release ]; then
cp /etc/parallels-release . 2>&1
fi
if [ -r /var/log/parallels.log ]; then
cp /var/log/parallels.log . 2>&1
fi
if [ -r /etc/nsswitch.conf ]; then
cp /etc/nsswitch.conf . 2>&1
fi
# gather aakore log and units info
if [ -r /var/log/acronis/aakore/aakore.log ]; then
cp /var/log/acronis/aakore/aakore.log . 2>&1
fi
if [ -x /opt/acronis/aakore ]; then
/opt/acronis/aakore units > aakore_units.txt 2>&1
fi
# Gather information about tape devices
if [ -x /usr/lib/Acronis/ARSM/tapes_info ]; then
/usr/lib/Acronis/ARSM/tapes_info tapes_info.txt
elif [ -x /bin/tapes_info ]; then
/bin/tapes_info tapes_info.txt
fi
#Get dumps from root folder by pattern
for f in /*.dmp; do
[ -r "$f" ] && tar -czf "$(basename $f).tar.gz" "$f";
done
disk_report_executable="$libdir/BackupAndRecovery/reportst"
# Gather disk information
if [ -x "$disk_report_executable" ]; then
"$disk_report_executable" "$work_dir/disk_report.txt"
fi
python_executable="/usr/sbin/acropsh"
sysinfo_py="/usr/lib/Acronis/BackupAndRecovery/sysinfo.py"
if [ ! \( -x "$python_executable" -a -f "$sysinfo_py" \) ]; then
# if scripts not found in standard locations try Virtual Appliance locations
python_executable="/bin/acropsh"
sysinfo_py="/bin/sysinfo.py"
fi
if [ -x "$python_executable" -a -f "$sysinfo_py" ]; then
# Continue sysinfo collection using python report utility
$python_executable $sysinfo_py
else
#netstat for BM
if [ -x /bin/acronis ]; then
if [ -x /bin/netstat ]; then
/bin/netstat -na > netstat.txt 2>&1
else
echo "Netstat is not installed on the system" > netstat.txt
fi
fi
fi
cd ../
find ./logs -name preferred\* -print0 | xargs -0 rm -f
if [ "$is_dir_mode" -eq "1" ]; then
if [ "$silent_mode" -eq "0" ]; then
echo Sysinfo collected into $work_dir
fi
exit 0
fi
tar -cjf "$result_abs_path" ./logs
rm -rf ./logs
if [ -f "$result_abs_path" ]; then
if [ "$silent_mode" -eq "0" ]; then
echo Report file $result_abs_path has been created.
fi
exit 0
fi
exit 1