PDA

View Full Version : [ubuntu] backup script help....



speedway
May 9th, 2010, 05:06 PM
Hi all

I am not much of a commandline person aside from following orders, so to speak. I am looking for help with a shell script that could be run from cron to backup some of my files on a nightly basis to another drive in the same machine.

Basically I want to back up the following:

My home dir, including "hidden" files e.g. ".XXXX"
/etc/X11/xorg.conf
/etc/samba/smb.conf
/etc/network/interfaces
/etc/resolv.conf
/etc/fstab
plus execute a MySQL backup script for one particular database.

Can all that be done in one script? Anyone care to show me the way of accomplishing all that... please :) :KS

Please be gentle, I am more a desktop warrior than a command line warrior.

Thanks in advance

Cheers
Bruce

jd65pl
May 9th, 2010, 05:47 PM
take a look at rsync (https://help.ubuntu.com/community/rsync), and mysqldump (http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html)

speedway
May 10th, 2010, 12:28 AM
Great, thanks. Rsync might be my friend, mysqldump not so much. There is already a utility to back the DB up on the system (MythBuntu) so it would be simply a case of starting that.

Off to do some reading.....

Cheers