Home > computing > A Bash Script to Backup Some of my Ubuntu Settings and Configurations

A Bash Script to Backup Some of my Ubuntu Settings and Configurations

January 31, 2009 Leave a comment Go to comments

Here is a bash script I wrote to backup some of my user preferences and configuration for my Ubuntu 8.10 installation and some of my apps settings.

#!/bin/sh

#will put all backups in ./backups/YYYYMMDD_HHMM/
DATETIME=`date +%Y%m%e_%H%M`
USER="YOURUSERNAME"
DEST="backups/$DATETIME"
mkdir "backups"
mkdir "backups/$DATETIME"

#computer setups
cp /boot/grub/menu.lst $DEST/menu.lst
cp /etc/X11/xorg.conf $DEST/xorg.conf
cp /etc/fstab $DEST/fstab

#user files/profiles
##files
cp /home/$USER/.gnome2/stickynotes_applet $DEST/stickynotes_applet
cp /home/$USER/.gtk-bookmarks $DEST/.gtk-bookmarks

##folders
tar -cvvf $DEST/purple.tar /home/$USER/.purple/
tar -cvvf $DEST/mozilla.tar --exclude-tag-all='_CACHE_MAP_' --exclude='urlclassifier3.sqlite' /home/$USER/.mozilla/
tar -cvvf $DEST/Templates.tar /home/$USER/Templates/
tar -cvvf $DEST/gconf.tar /home/$USER/.gconf/
tar -cvvf $DEST/gnome2.tar /home/$USER/.gnome2/
tar -cvvf $DEST/gnome-color-chooser.tar /home/$USER/.gnome-color-chooser/
Advertisements
Categories: computing Tags:
  1. No comments yet.
  1. No trackbacks yet.

I don't read comments anymore due to an increase in spam comments. If you want to get in touch please send me an email (see tianjara.net for details).

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: