acronis-backup-cloud.premium-2.2-2058.el7.centos T > D
, 0 @ 388a1021ca3962c5f82a6a4940c3cf5f2c0e1ce1 Iw``/j0@ l > ? H$ ? H d # 3 H ! O U \ ' ) b ~
0 T ]
h 1 .D . . / 0 0 0Q ( 0S = 0Z > 0b ? 0j B 0r G 0 H h I J
X , Y 4 Z L [ X \ \ ] ^ | b a d b[ e b` f bc l be t b u v # w x H C acronis-backup-cloud.premium 2.2 2058.el7.centos Acronis Backup Cloud Acronis Backup Cloud directly enables service providers to add new revenue streams.
This offering, powered by the Acronis AnyData Engine, is a comprehensive file- and image,
cloud backup and recovery solution that enables service providers to expand their data protection offerings,
localize an automated backup service, grow recurring revenue, and increase customer stickiness.
Service Providers face zero entry costs and can easily scale with the pay-per-use model.
Acronis Backup Cloud can be syndicated (hosted by Acronis) or deployed in a hybrid model,
using the service provider’s own local backup storage.
For end-customers, Acronis Backup Cloud is the most efficient and scalable way to protect their data.
Based upon their data protection needs, end-customers can decide to back up different types of data to any location—cloud,
on-premise or both—ensuring the highest level of security and cost-efficiency.
The entire service is founded on the proven Acronis Backup Advanced technologies for workstations,
physical and virtual servers and applications, enabling end-customers to back up any environment and recover anywhere. \V5320e0e6f8dd © 2002-2016 Acronis International GmbH. All rights reserved Application http://www.acronis.com/provider/backup-cloud/ linux noarch if [ -z "$POA_HOST" ]; then
echo "error: You should set env variable POA_HOST"
exit 1
fi
PKG_VERSION=2.2-2058
INSTALL_LOG_PATH="/var/log/acronis-backup-cloud.premium-$PKG_VERSION-install.log"
for service in redis
do
systemctl enable ${service} >> ${INSTALL_LOG_PATH}
autostart=`systemctl is-enabled ${service}`
if [ "$autostart" != "enabled" ]; then
echo "Service \"$service\" is required to be registered for auto start, execute \"systemctl enable $service\" and try again."
exit 1
fi
systemctl start ${service} >> ${INSTALL_LOG_PATH}
active=`systemctl is-active ${service}`
if [ "$active" != "active" ]; then
echo "Service \"$service\" is not running, start \"$service\" and try again."
exit 1
fi
done
for ext in posix pdo_sqlite mbstring xml xmlrpc soap
do
enabled=`php -m | grep -w "$ext"`
if [ -z "$enabled" ]; then
echo "Required PHP extension \"$ext\" is not enabled."
exit 1
fi
done
# check build version
UPGRADE_VERSION_SUPPORTED=1994
RECOMMENDED_UPGRADE_VERSION=2007
BUILD_VERSION=$(rpm -qa | grep acronis-backup | sed 's/.*-//g' | sed 's/\..*//g')
if [ -n "$BUILD_VERSION" ]; then
if [ ${BUILD_VERSION} -lt ${UPGRADE_VERSION_SUPPORTED} ]; then
echo "Direct upgrade from the current version to version 2058 is not supported."
echo "Please first upgrade to version ${RECOMMENDED_UPGRADE_VERSION} or later, and then ensure that the APS instances are upgraded. After that you may proceed with the upgrade to version 2058."
exit 1
fi;
fi;
TS=$(date +%s)
CURL_COMMAND="curl -s"
if [ -z "$POA_SCHEME" ]; then
POA_SCHEME=http
fi
if [ -z "$POA_HOST" ]; then
POA_HOST=127.0.0.1
fi
if [ -z "$POA_PORT" ]; then
POA_PORT=8440
fi
if [ -z "$POA_PATH" ]; then
POA_PATH=RPC2
fi
POA_URL="$POA_SCHEME://$POA_HOST:$POA_PORT/$POA_PATH"
BEGIN_TXN_XML=$(cat << EOF
txn.Beginrequest_idREQUEST_ID
EOF
)
ROLLBACK_TXN_XML=$(cat << EOF
txn.Rollbackrequest_idREQUEST_ID
EOF
)
XML_TXN=$(echo ${BEGIN_TXN_XML}| sed "s@REQUEST_ID@${TS}@g")
RESPONSE=$(${CURL_COMMAND} -X POST -d "${XML_TXN}" ${POA_URL})
if [[ $? -ne 0 ]]
then
echo $?
echo "Error while checking environment, is Odin Automation up and running?"
exit 1
else
STATUS=$(echo ${RESPONSE} | awk '{ match($0, /(.+)<\/i4>/, m); print m[1]}')
if [[ $STATUS != 0 || $? -ne 0 ]]
then
echo "Non zero exit while checking Odin Automation Environment"
exit 1
fi
fi
TXN_ID=$(echo ${RESPONSE} | awk '{ match($0, /(.+)<\/string>/, m); print m[1]}')
XML_TXN=$(echo ${ROLLBACK_TXN_XML}| sed "s@REQUEST_ID@${TXN_ID}@g")
RESPONSE=$(${CURL_COMMAND} -X POST -d "${XML_TXN}" ${POA_URL})
# ===== POST ===========================================================================================================
ENDPOINT_LOCATION=$RPM_INSTALL_PREFIX
HTTPD_ACRONIS_CONF_FILE="/etc/httpd/conf.d/acronis.conf"
if [ -f ${HTTPD_ACRONIS_CONF_FILE} ]
then
OLD_ENDPOINT_LOCATION=$(awk '{ match($0, //, m); print m[1]}' ${HTTPD_ACRONIS_CONF_FILE} | tr -d '[:space:]')
HTACCESS_FILE="${OLD_ENDPOINT_LOCATION}/.htaccess"
if [ $(awk '{ match($0, /SSLEngine[[:space:]](\w+)/, m); print m[1]}' ${HTTPD_ACRONIS_CONF_FILE} | tr -d '[:space:]') == 'on' ]
then ENDPOINT_SCHEME="https"
else ENDPOINT_SCHEME="http"
fi
ENDPOINT_HOST=$(awk '{ match($0, /Listen[[:space:]](.+):[0-9]+/, m); print m[1]}' ${HTTPD_ACRONIS_CONF_FILE} | tr -d '[:space:]')
if [[ -z ${ENDPOINT_HOST} ]]
then
ENDPOINT_HOST=$(python /usr/local/share/acronis-backup-cloud.premium/scripts/endpoint_host.py)
fi
ENDPOINT_PORT=$(awk '{ match($0, /Listen[[:space:]](.+:)?([0-9]+)/, m); print m[2]}' ${HTTPD_ACRONIS_CONF_FILE} | tr -d '[:space:]')
ENDPOINT_PATH=$(awk '{ match($0, /RewriteBase[[:space:]]\/(.+)/, m); print m[1]}' ${HTACCESS_FILE} | tr -d '[:space:]')
else
if [ -z "$ENDPOINT_SCHEME" ]; then
ENDPOINT_SCHEME=https
fi
if [ -z "$ENDPOINT_HOST" ]; then
ENDPOINT_HOST=$(python /usr/local/share/acronis-backup-cloud.premium/scripts/endpoint_host.py)
fi
if [ -z "$ENDPOINT_PORT" ]; then
ENDPOINT_PORT=10443
fi
if [ -z "$ENDPOINT_PATH" ]; then
ENDPOINT_PATH=backupservice
fi
openssl genrsa -out clientcert.key
openssl req -x509 -new -nodes -key clientcert.key -subj "/DC=APS/DC=Application Endpoint/O=$HOSTNAME/OU=APS/CN=$HOSTNAME" -out clientcert.crt
if [ -f clientcert.crt ]
then
cp clientcert.crt /etc/pki/tls/certs/
cp clientcert.key /etc/pki/tls/private/
chmod 0600 /etc/pki/tls/private/clientcert.key
else
echo "SSL certificate generation failed"
exit 1
fi
fi
cp /usr/local/share/acronis-backup-cloud.premium/acronis.conf /etc/httpd/conf.d/
sed -i "s/__ENDPOINT_PORT__/$ENDPOINT_PORT/g" /etc/httpd/conf.d/acronis.conf
sed -i "s/__ENDPOINT_PATH__/$ENDPOINT_PATH/g" /etc/httpd/conf.d/acronis.conf
sed -i "s#__ENDPOINT_LOCATION__#$ENDPOINT_LOCATION#g" /etc/httpd/conf.d/acronis.conf
chmod 644 /etc/httpd/conf.d/acronis.conf
cp /usr/local/share/acronis-backup-cloud.premium/.htaccess $ENDPOINT_LOCATION/.htaccess
sed -i "s#__ENDPOINT_PATH__#$ENDPOINT_PATH#g" $ENDPOINT_LOCATION/.htaccess
chown apache:apache $ENDPOINT_LOCATION/.htaccess
chmod 644 $ENDPOINT_LOCATION/.htaccess
rm -rf $ENDPOINT_LOCATION/typeCache
mkdir -p $ENDPOINT_LOCATION/typeCache
echo "order deny,allow" > $ENDPOINT_LOCATION/typeCache/.htaccess
echo "deny from all" >> $ENDPOINT_LOCATION/typeCache/.htaccess
chown -R apache:apache $ENDPOINT_LOCATION/typeCache
chmod 644 $ENDPOINT_LOCATION/typeCache/.htaccess
service httpd restart
sleep 5
CONFIG_FILES=(/config/application.yaml /config/ba-api.ini /config/application_settings.ini)
CONFIG_SUFFIX=".sample"
for CONFIG_FILE in ${CONFIG_FILES[*]}
do
CONFIG_PATH="$ENDPOINT_LOCATION$CONFIG_FILE"
if [ ! -f "$CONFIG_PATH" ]
then
cp "$CONFIG_PATH$CONFIG_SUFFIX" "$CONFIG_PATH"
chown -R apache:apache "$CONFIG_PATH"
fi
done
if [ -z "$POA_SCHEME" ]; then
POA_SCHEME=http
fi
if [ -z "$POA_HOST" ]; then
POA_HOST=127.0.0.1
fi
if [ -z "$POA_PORT" ]; then
POA_PORT=8440
fi
if [ -z "$POA_PATH" ]; then
POA_PATH=RPC2
fi
POA_URL="$POA_SCHEME://$POA_HOST:$POA_PORT/$POA_PATH"
ENDPOINT_URL="$ENDPOINT_SCHEME://$ENDPOINT_HOST:$ENDPOINT_PORT/$ENDPOINT_PATH"
PKG_NAME=AcronisBackupCloud.app.zip
PKG_VERSION=2.2-2058
PKG_TYPE=premium
INSTALL_LOG_PATH="/var/log/acronis-backup-cloud.premium-$PKG_VERSION-install.log"
SCRIPTS_DIR="/usr/local/share/acronis-backup-cloud.premium/scripts"
echo "define('OPEN_API_PROTOCOL', '$POA_SCHEME');" >> $ENDPOINT_LOCATION/app/config.php
echo "define('OPEN_API_URI', '$POA_HOST');" >> $ENDPOINT_LOCATION/app/config.php
echo "define('PACKAGE_TYPE', '$PKG_TYPE');" >> $ENDPOINT_LOCATION/app/config.php
echo "define('OA_URL', '$POA_URL');" >> $ENDPOINT_LOCATION/app/config.php
echo "define('ENDPOINT_URL', '$ENDPOINT_URL');" >> $ENDPOINT_LOCATION/app/config.php
echo "define('ADDITIONAL_FILE_PATH', '/usr/local/share/acronis-backup-cloud.premium/');" >> $ENDPOINT_LOCATION/app/config.php
# migrating database (list of migrations is defined in DatabaseMigrate.php __construct)
sudo -H -u apache bash -c "php $ENDPOINT_LOCATION/bin/manage.php database:migrate"
# adding and deleting cron tasks with logging of any cron installation fail
sh ${SCRIPTS_DIR}/edit-cron.sh\
"add"\
"apache"\
"/bin/env php $ENDPOINT_LOCATION/bin/manage.php usage-report:master"\
"Run master process of usage report collecting and aggregating."\
"$INSTALL_LOG_PATH"\
"30 * * * *"
sh ${SCRIPTS_DIR}/edit-cron.sh\
"add"\
"apache"\
"/bin/env php $ENDPOINT_LOCATION/bin/manage.php usage-report:erase"\
"Run erasing of outdated reports daily at 2:00 am."\
"$INSTALL_LOG_PATH"\
"0 2 * * *"
python ${SCRIPTS_DIR}/install.py -u $POA_URL -e $ENDPOINT_URL -p $PKG_NAME -v $PKG_VERSION -r $ENDPOINT_LOCATION/config/resources.json -l ${INSTALL_LOG_PATH}
if [ $? -ne 0 ]; then
exit 1;
fi
echo
echo "CONGRATULATIONS! Endpoint configured SUCCESSFULLY"
echo
echo "Endpoint URL: $ENDPOINT_URL"
echo
# ===== FILES ==========================================================================================================
if [ $1 = 0 ] ; then
SCRIPTS_DIR="/usr/local/share/acronis-backup-cloud.premium/scripts"
ENDPOINT_LOCATION=$RPM_INSTALL_PREFIX
PKG_VERSION=2.2-2058
INSTALL_LOG_PATH="/var/log/acronis-backup-cloud.premium-$PKG_VERSION-install.log"
sh ${SCRIPTS_DIR}/edit-cron.sh\
"delete"\
"apache"\
"/bin/env php $ENDPOINT_LOCATION/bin/manage.php usage-report:master"\
"Run master process of usage report collecting and aggregating."\
"$INSTALL_LOG_PATH"
sh ${SCRIPTS_DIR}/edit-cron.sh\
"delete"\
"apache"\
"/bin/env php $ENDPOINT_LOCATION/bin/manage.php usage-report:erase"\
"Run erasing of outdated reports daily at 2:00 am."\
"$INSTALL_LOG_PATH"
fi H d @
C : .oG
F t e - 7 ~ `. ' i U 4 C ' l Y $x z . 8 ( H J x =
f b # U ~ F R n h X $ X % N \ V f, &