Recent dev
This commit is contained in:
parent
00f5dcc8f3
commit
63d0ccc2de
@ -11,9 +11,10 @@ if (ping -c 4 "$1" | grep -c ' 0% packet loss,'); then
|
||||
echo User did not confirm.
|
||||
exit 1;
|
||||
else
|
||||
rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / root@"$1":/mnt/
|
||||
echo rsync exited with status $?
|
||||
exit $?
|
||||
rsync -aAXv --delete --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / root@"$1":/mnt/
|
||||
status="$?"
|
||||
echo rsync exited with status $status
|
||||
exit $status
|
||||
fi
|
||||
else
|
||||
echo "Host is not responding in a timely fashion."
|
||||
|
@ -3,10 +3,6 @@
|
||||
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"
|
||||
@ -14,13 +10,14 @@ chmod 0770 "$BACKUPDIR"
|
||||
$BACKUPCMD /root/bin/ "$BACKUPDIR"/root/bin/
|
||||
|
||||
## Backup configuration ##
|
||||
/usr/local/src/MiscScripts/ShadowArch/shadowarch-tar-gen
|
||||
cp /srv/http/aninix.net/shadowarch.tar "$BACKUPDIR"
|
||||
cp -r /etc/skel "$BACKUPDIR"
|
||||
cp /etc/bash.bashrc "$BACKUPDIR"/bash.bashrc
|
||||
cp /etc/vimrc "$BACKUPDIR"/vimrc
|
||||
|
||||
## Backup the good servers ##
|
||||
|
||||
### SSHD ###
|
||||
$BACKUPCMD /etc/ssh/ "$BACKUPDIR"/ssh
|
||||
$BACKUPCMD /etc/ssh "$BACKUPDIR"/ssh
|
||||
|
||||
### Lighttpd ###
|
||||
$BACKUPCMD /etc/lighttpd/ "$BACKUPDIR"/lighttpd
|
||||
@ -50,6 +47,7 @@ cp /usr/share/webapps/tt-rss/config.php "$BACKUPDIR"/singularity-config.php
|
||||
sudo -u postgres pg_dump aninix_wiki > "$BACKUPDIR"/aninix_wiki.psql
|
||||
sudo -u postgres pg_dump gb_wiki > "$BACKUPDIR"/gb_wiki.psql
|
||||
sudo -u postgres pg_dump ttrss > "$BACKUPDIR"/ttrss.psql
|
||||
sudo -u postgres pg_dump lykos-wiki > "$BACKUPDIR"/lykos-wiki.psql
|
||||
|
||||
### Yggdrasil -- File list only for space reasons ###
|
||||
if [ -x /usr/bin/locate ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user