Created
June 11, 2014 02:55
-
-
Save j5ik2o/1d859a3f12b4c2ddd245 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
BACKUPS_DIR=~/backups | |
grep "\[インストール\]" /var/log/aptitude > $BACKUPS_DIR/apt-package.list | |
cd / | |
sudo tar zcvf $BACKUPS_DIR/etc_fail2ban.tgz etc/fail2ban | |
sudo tar zcvf $BACKUPS_DIR/etc_logwatch.tgz etc/logwatch | |
sudo tar zcvf $BACKUPS_DIR/etc_denyhosts.tgz etc/denyhosts.conf | |
sudo tar zcvf $BACKUPS_DIR/etc_postfix.tgz etc/postfix | |
sudo tar zcvf $BACKUPS_DIR/etc_sudoers_d.tgz etc/sudoers.d --exclude="README" | |
sudo tar zcvf $BACKUPS_DIR/etc_ufw.tgz etc/ufw | |
sudo tar zcvf $BACKUPS_DIR/lib_ufw.tgz lib/ufw --exclude="ufw-init*" | |
sudo tar zcvf $BACKUPS_DIR/etc_apache2.tgz etc/apache2 --exclude="*.pem" | |
sudo tar zcvf $BACKUPS_DIR/etc_s3conf.tgz etc/s3conf | |
sudo chown s3sync. $BACKUPS_DIR/*.tgz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
s3sync -r --delete -v ~/backups dev.j5ik2o.me:backup |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment