aboutsummaryrefslogtreecommitdiffstats
path: root/bin/backup-settings
diff options
context:
space:
mode:
authorDavid Runge <david.runge@frqrec.com>2013-12-31 14:19:23 +0100
committerDavid Runge <david.runge@frqrec.com>2013-12-31 14:19:23 +0100
commit931c8711d64b50c240c5cf1079480094dbde9ff1 (patch)
tree330d282d31afdf14412a60569d87e86603bcae9b /bin/backup-settings
parentd9fd1d6971d8b3d71a0f1556a3b5d29ea6641ac2 (diff)
downloaddotfiles-931c8711d64b50c240c5cf1079480094dbde9ff1.tar.gz
dotfiles-931c8711d64b50c240c5cf1079480094dbde9ff1.tar.bz2
dotfiles-931c8711d64b50c240c5cf1079480094dbde9ff1.tar.xz
dotfiles-931c8711d64b50c240c5cf1079480094dbde9ff1.zip
Adding new scripts from /usr/local/bin and updating backup-profiles and autostart
Diffstat (limited to 'bin/backup-settings')
-rwxr-xr-xbin/backup-settings19
1 files changed, 19 insertions, 0 deletions
diff --git a/bin/backup-settings b/bin/backup-settings
new file mode 100755
index 0000000..955a59e
--- /dev/null
+++ b/bin/backup-settings
@@ -0,0 +1,19 @@
+#! /bin/sh
+
+etcTMP=/tmp/etc.tgz
+etcIF=/etc
+OF=/home/dave/Dropbox/sync
+gpgEND=.gpg
+
+echo "Backing up /etc directory."
+tar cfPz $etcTMP $etcIF
+echo "Encrypting compressed directory."
+su - dave -c "gpg -e -r 'David Runge <david.runge@frqrec.com>' $etcTMP"
+echo "Changing permissions on file."
+chown dave:dave $etcTMP$gpgEND
+echo "Moving backup to Dropbox."
+mv -f $etcTMP$gpgEND $OF
+echo "Cleaning up."
+rm $etcTMP
+echo "Done."
+