After I had couple of system crashes, my GNOME configuration were not usable anymore (corrupted files). After number of attempts I've deleted GNOME configuration just to be able to login, I had to reconfigure many applications (Evolution, Network Manager, Nautilus, etc.)
I've decided to write a small script to backup important files. First of all, I've created .backup directory.
Then, in .backup directory I've created a file which contain the list of directories needed to backup.
Code:
gedit ~/.backup/backup.list
Code:
.config
.gconf
.gconfd
.gnome2
.gnome2_private
.gnupg
.evolution
.nautilus
Finally, a small bash script to create compressed tar archive
Code:
gedit ~/.backup/backup.sh
Code:
#!/bin/bash
# create backup prefix and suffix using date command
preffix=$(date +%F) # %F full date (same as %Y-%m-%d)
suffix='.tar.gz'
# create backup using compressed tar
tar pzcf ~/.backup/$preffix\_backup$suffix -T ~/.backup/backup.list
That's it.
To use the script, all you have to do is to make it executable
Code:
chmod +x .~/.backup/backup.sh
and run it
Code:
~/.backup/backup.sh
If someone has know which other directories need to be backed up, please...
Bookmarks