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.
|
echo User did not confirm.
|
||||||
exit 1;
|
exit 1;
|
||||||
else
|
else
|
||||||
rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / root@"$1":/mnt/
|
rsync -aAXv --delete --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / root@"$1":/mnt/
|
||||||
echo rsync exited with status $?
|
status="$?"
|
||||||
exit $?
|
echo rsync exited with status $status
|
||||||
|
exit $status
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Host is not responding in a timely fashion."
|
echo "Host is not responding in a timely fashion."
|
||||||
|
@ -3,10 +3,6 @@
|
|||||||
export BACKUPDIR="/usr/local/backup"
|
export BACKUPDIR="/usr/local/backup"
|
||||||
export BACKUPCMD="rsync -avzl --delete-after";
|
export BACKUPCMD="rsync -avzl --delete-after";
|
||||||
|
|
||||||
if [ ! -d "$BACKUPDIR" ]; then
|
|
||||||
mkdir "$BACKUPDIR"
|
|
||||||
fi
|
|
||||||
|
|
||||||
## Backup small development ##
|
## Backup small development ##
|
||||||
chown postgres:root "$BACKUPDIR"
|
chown postgres:root "$BACKUPDIR"
|
||||||
chmod 0770 "$BACKUPDIR"
|
chmod 0770 "$BACKUPDIR"
|
||||||
@ -14,13 +10,14 @@ chmod 0770 "$BACKUPDIR"
|
|||||||
$BACKUPCMD /root/bin/ "$BACKUPDIR"/root/bin/
|
$BACKUPCMD /root/bin/ "$BACKUPDIR"/root/bin/
|
||||||
|
|
||||||
## Backup configuration ##
|
## Backup configuration ##
|
||||||
/usr/local/src/MiscScripts/ShadowArch/shadowarch-tar-gen
|
cp -r /etc/skel "$BACKUPDIR"
|
||||||
cp /srv/http/aninix.net/shadowarch.tar "$BACKUPDIR"
|
cp /etc/bash.bashrc "$BACKUPDIR"/bash.bashrc
|
||||||
|
cp /etc/vimrc "$BACKUPDIR"/vimrc
|
||||||
|
|
||||||
## Backup the good servers ##
|
## Backup the good servers ##
|
||||||
|
|
||||||
### SSHD ###
|
### SSHD ###
|
||||||
$BACKUPCMD /etc/ssh/ "$BACKUPDIR"/ssh
|
$BACKUPCMD /etc/ssh "$BACKUPDIR"/ssh
|
||||||
|
|
||||||
### Lighttpd ###
|
### Lighttpd ###
|
||||||
$BACKUPCMD /etc/lighttpd/ "$BACKUPDIR"/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 aninix_wiki > "$BACKUPDIR"/aninix_wiki.psql
|
||||||
sudo -u postgres pg_dump gb_wiki > "$BACKUPDIR"/gb_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 ttrss > "$BACKUPDIR"/ttrss.psql
|
||||||
|
sudo -u postgres pg_dump lykos-wiki > "$BACKUPDIR"/lykos-wiki.psql
|
||||||
|
|
||||||
### Yggdrasil -- File list only for space reasons ###
|
### Yggdrasil -- File list only for space reasons ###
|
||||||
if [ -x /usr/bin/locate ]; then
|
if [ -x /usr/bin/locate ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user