Commit 892895e8 authored by Igor Pecovnik's avatar Igor Pecovnik
Browse files

Added rsyc script, working with the same file list ... dry run by default

parent c5ca0ce5
......@@ -14,13 +14,6 @@ HOST=localhost
mkdir -p $COPY_TO
function crontab_backup ()
{
echo -e "[\e[0;32m o.k. \x1B[0m] \e[1;32m$1\x1B[0mCrontab backup"
crontab -l > $COPY_TO/crontab-root.txt &> /dev/null
}
function database_backup ()
{
if which mysql >/dev/null; then
......@@ -97,7 +90,6 @@ function pkglist_backup ()
# main app
crontab_backup
database_backup
web_backup
conf_backup
......
/etc/dovecot/dovecot.conf
/etc/dovecot/dovecot.pem
/etc/dovecot/private/dovecot.pem
/etc/cups
/etc/fstab
/etc/transmission-daemon/settings.json
/etc/scanbuttond
/etc/apache2
/etc/dovecot
#/etc/cups
#/etc/fstab
#/etc/transmission-daemon/settings.json
#/etc/scanbuttond
#/etc/apache2
/etc/memcached.conf
/etc/logrotate.conf
#/etc/logrotate.conf
/etc/mail
/etc/mailname
/etc/nginx
/etc/dbconfig-common
/etc/init.d/scanbuttond
#/etc/init.d/scanbuttond
/etc/postfix
/etc/rc.local
/etc/passwd
#/etc/rc.local
/etc/php5
/etc/getmail
/usr/local/bin/.sync
/etc/fail2ban
/etc/shadow
/etc/group
/etc/gshadow
#/usr/local/bin/.sync
/etc/mysql/my.cnf
/etc/default/stunnel4
/usr/local/vpnserver/vpn_server.config
/usr/bin/tv_grab_file
/home/hts/.hts/tvheadend
/etc/samba/smb.conf
/etc/modules
/etc/network/interfaces
/etc/hostapd.conf
/etc/hostapd-rt.conf
/etc/usbsrvd.conf
#/usr/local/vpnserver/vpn_server.config
#/usr/bin/tv_grab_file
#/home/hts/.hts/tvheadend
#/etc/samba/smb.conf
#/etc/modules
#/etc/network/interfaces
#/etc/hostapd.conf
#/etc/hostapd-rt.conf
#/etc/usbsrvd.conf
/etc/default/stunnel4
/etc/stunnel
/etc/logrotate.d
/usr/local/ispconfig/interface/ssl/startssl.chain.class1.server.crt
/usr/local/ispconfig/interface/ssl/startssl.sub.class1.server.ca.crt
/root/removecomptorrent.sh
/root/.ssh
/root/.gnupg
\ No newline at end of file
#/etc/logrotate.d
/usr/local/ispconfig/interface/ssl
/usr/local/bin/removecomptorrent.sh
/var/spool/cron/crontabs
#/etc/crontab
/var/vmail
/var/www
\ No newline at end of file
#!/bin/bash
REMOTE=
function sync_backup ()
{
echo -e "[\e[0;32m o.k. \x1B[0m] \e[1;32m$1\x1B[0mSync over trusted ssh net"
filename=filelist.txt
IFS=$'\n'
for next in `cat $filename`
do
if [[ $next != \#* ]]; then
echo $next
rsync --dry-run -az --progress $REMOTE:$next $next
[[ ! $? -eq 0 ]] && read
fi
done
}
sync_backup
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment