Script kings this way please-->

Soldato
Joined
19 Oct 2002
Posts
6,943
Location
Bath
Right guys I'm a bit of a noobie when it comes to scripting and cron jobs and the like.
So what I'm looking for is anyone that is willing to write me a script that will backup two folders (Firefox preferences and Thunderbird emails) every time i shutdown or log off my Ubuntu box.

location of Firefox prefs /home/ian/.mozilla/firefox
location of Thunderbird email /home/ian/.mozilla-thunderbird

and the save location is /media/hdb1/Backup

I would prefer them tared and ziped and for it to keep one previous file if this is possible.

i know how to do most of this within windows and im sure its possible to do it within Ubuntu i just dont know how!

Any help would be greatly appreciated.

Thanks in advance
Ian
 
cool thanks, will give it a try.
I have been poking around on the Ubuntu forums and havent yet found what i want but im sure its there. :)
 
somthing cannot beworking right as i get this output
Code:
$ sh backup.sh
tar: Removing leading `/' from member names
gzip: firefox-cur.tar.gz: Operation not permitted
gzip: firefox-cur.tar.gz: Operation not permitted
tar: Removing leading `/' from member names
gzip: thunderbird-cur.tar.gz: Operation not permitted
gzip: thunderbird-cur.tar.gz: Operation not permitted
ian@ian-desktop:~/Desktop$

but it does create the gz files
 
Code:
ian@ian-desktop:~/Desktop$ sh -v backup.sh
cd /media/hdb1/Backup

mv firefox-cur.tar.gz firefox-old.tar.gz
tar -cf firefox-cur.tar /home/ian/.mozilla/firefox/*
tar: Removing leading `/' from member names
gzip -f -v firefox-cur.tar
firefox-cur.tar:        gzip: firefox-cur.tar.gz: Operation not permitted
gzip: firefox-cur.tar.gz: Operation not permitted
 27.9% -- replaced with firefox-cur.tar.gz

mv thunderbird-cur.tar.gz thunderbird-old.tar.gz
tar -cf thunderbird-cur.tar /home/ian/.mozilla-thunderbird/*
tar: Removing leading `/' from member names
gzip -f -v thunderbird-cur.tar
thunderbird-cur.tar:    gzip: thunderbird-cur.tar.gz: Operation not permitted
gzip: thunderbird-cur.tar.gz: Operation not permitted
 39.7% -- replaced with thunderbird-cur.tar.gz

ian@ian-desktop:~/Desktop$

With the -v option
 
Back
Top Bottom