This commit is contained in:
DarkFeather 2016-11-09 22:29:17 -06:00
parent d7d5eb346c
commit 00f5dcc8f3
2 changed files with 18 additions and 4 deletions

View File

@ -1,4 +1,5 @@
SHELL := /bin/bash
BACKUPDIR := /usr/local/backup
compile:
pacman -S openssl gzip tar openssh
@ -58,3 +59,13 @@ scripts: ./server-backup ./remote-backup
reverse:
cp /root/bin/server-backup .
cp /root/bin/remote-backup .
checkperm:
chmod 0700 /root/bin/remote-backup /root/bin/remote-backup
chown root:root /root/bin/server-backup /root/bin/remote-backup
chmod -R 0700 /usr/local/etc/Aether
chown -R aether:aether /usr/local/etc/Aether
chown postgres:root ${BACKUPDIR}
chmod 0770 ${BACKUPDIR}

View File

@ -3,6 +3,10 @@
export BACKUPDIR="/usr/local/backup"
export BACKUPCMD="rsync -avzl --delete-after";
if [ ! -d "$BACKUPDIR" ]; then
mkdir "$BACKUPDIR"
fi
## Backup small development ##
chown postgres:root "$BACKUPDIR"
chmod 0770 "$BACKUPDIR"
@ -10,14 +14,13 @@ chmod 0770 "$BACKUPDIR"
$BACKUPCMD /root/bin/ "$BACKUPDIR"/root/bin/
## Backup configuration ##
cp -r /etc/skel "$BACKUPDIR"
cp /etc/bash.bashrc "$BACKUPDIR"/bash.bashrc
cp /etc/vimrc "$BACKUPDIR"/vimrc
/usr/local/src/MiscScripts/ShadowArch/shadowarch-tar-gen
cp /srv/http/aninix.net/shadowarch.tar "$BACKUPDIR"
## Backup the good servers ##
### SSHD ###
$BACKUPCMD /etc/ssh "$BACKUPDIR"/ssh
$BACKUPCMD /etc/ssh/ "$BACKUPDIR"/ssh
### Lighttpd ###
$BACKUPCMD /etc/lighttpd/ "$BACKUPDIR"/lighttpd