Add file level restore capability to CentOS, install dependencies for NFS mounts, same improvements to docker container

This commit is contained in:
ronivay
2018-10-09 15:32:06 +03:00
parent 1765375cb8
commit 6351dbf933
4 changed files with 31 additions and 4 deletions

View File

@@ -77,10 +77,13 @@ docker run -p 80:80 -v /path/to/xodata:/var/lib/xo-server -v /path/to/redisdata:
Tool has been tested to work with following distros: Tool has been tested to work with following distros:
- CentOS 7 - CentOS 7 (note LVM file level restore issue from below)
- Debian 9 - Debian 9
- Ubuntu 16.04 - Ubuntu 16.04
In order to use file level restore from delta backups, the service needs to be ran as root.
CentOS installation is currently not able to do file level restore if the backed up disk contains LVM.
CentOS setup is confirmed to work with fresh minimal installation and SELinux enabled. CentOS setup is confirmed to work with fresh minimal installation and SELinux enabled.
Although script doesn't do any SELinux checks or modifications, so you need to take care of possible changes by yourself according to your system. Although script doesn't do any SELinux checks or modifications, so you need to take care of possible changes by yourself according to your system.
@@ -105,6 +108,7 @@ CentOS:
- python - python
- git - git
- nfs-utils - nfs-utils
- libvhdi-tools
Debian/Ubuntu: Debian/Ubuntu:
- apt-transport-https - apt-transport-https

View File

@@ -15,7 +15,11 @@ RUN yum -y install yarn
RUN yum -y install epel-release RUN yum -y install epel-release
# build dependencies, git for fetching source and redis server for storing data # build dependencies, git for fetching source and redis server for storing data
RUN yum -y install gcc gcc-c++ make openssl-devel redis libpng-devel python git RUN yum -y install gcc gcc-c++ make openssl-devel redis libpng-devel python git nfs-utils
# libvhdi-tools for file-level restore
RUN rpm -ivh https://forensics.cert.org/cert-forensics-tools-release-el7.rpm
RUN yum --enablerepo=forensics install -y libvhdi-tools
# monit to keep an eye on processes # monit to keep an eye on processes
RUN yum -y install monit RUN yum -y install monit

View File

@@ -8,3 +8,7 @@ check process xo-server with pidfile /var/run/xo-server.pid
check process redis with pidfile /var/run/redis_6379.pid check process redis with pidfile /var/run/redis_6379.pid
start program = "/usr/bin/redis-server /etc/redis.conf --daemonize yes" start program = "/usr/bin/redis-server /etc/redis.conf --daemonize yes"
stop program = "/usr/bin/redis-cli shutdown" stop program = "/usr/bin/redis-cli shutdown"
check process rpcbind
matching "rpcbind"
start program = "/usr/sbin/rpcbind"

View File

@@ -88,6 +88,16 @@ function InstallDependenciesCentOS {
echo "done" echo "done"
fi fi
# only install libvhdi-tools if vhdimount is not present
if [[ -z $(which vhdimount) ]]; then
echo
echo -n "Installing libvhdi-tools from forensics repository"
rpm -ivh https://forensics.cert.org/cert-forensics-tools-release-el7.rpm >/dev/null
sed -i 's/enabled=1/enabled=0/g' /etc/yum.repos.d/cert-forensics-tools.repo
yum --enablerepo=forensics install -y libvhdi-tools >/dev/null
echo "done"
fi
# install # install
echo echo
echo -n "Installing build dependencies, redis server, python, git, nfs-utils..." echo -n "Installing build dependencies, redis server, python, git, nfs-utils..."
@@ -98,6 +108,9 @@ function InstallDependenciesCentOS {
echo "Enabling and starting redis service" echo "Enabling and starting redis service"
/bin/systemctl enable redis >/dev/null && /bin/systemctl start redis >/dev/null /bin/systemctl enable redis >/dev/null && /bin/systemctl start redis >/dev/null
echo "Enabling and starting rpcbind service"
/bin/systemctl enable rpcbind >/dev/null && /bin/systemctl start rpcbind >/dev/null
} 2>$LOGFILE } 2>$LOGFILE
function InstallDependenciesDebian { function InstallDependenciesDebian {
@@ -151,12 +164,14 @@ function InstallDependenciesDebian {
# install packages # install packages
echo echo
echo -n "Installing build dependencies, redis server, python, git, libvhdi-utils, lvm2..." echo -n "Installing build dependencies, redis server, python, git, libvhdi-utils, lvm2, nfs-common..."
apt-get install -y build-essential redis-server libpng-dev git python-minimal libvhdi-utils lvm2 >/dev/null apt-get install -y build-essential redis-server libpng-dev git python-minimal libvhdi-utils lvm2 nfs-common >/dev/null
echo "Enabling and starting redis service" echo "Enabling and starting redis service"
/bin/systemctl enable redis-server >/dev/null && /bin/systemctl start redis-server >/dev/null /bin/systemctl enable redis-server >/dev/null && /bin/systemctl start redis-server >/dev/null
echo "Enabling and starting rpcbind service"
/bin/systemctl enable rpcbind >/dev/null && /bin/systemctl start rpcbind >/dev/null
} 2>$LOGFILE } 2>$LOGFILE