Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

Backing up and emailing backups

Quote Reply
Backing up and emailing backups
I'd like to backup several directories into one tar archive using a cronjob, and also tar a mysql dump for easier downloading. Then if it doesn't get too complicated have some of these emailed to me. I know a script would be necessary for the emailing (?) but some of the FAQs I've read assume prior knowledge and it's difficult tracking down a straight answer. So over to you guys.

Currently I backup the database with this cronjob:

mysqldump --add-drop-table -uroot -ppassword database_name > /home/site/public_html/backup_database.txt

I haven't set this up yet, but will the following tar command work, or do I need to remove "/backup_database.txt" from the end?

tar czpf /home/site/public_html/backup_database.gz /home/site/cgi-bin/program/data/backup_database.txt

I'm using a dedicated Linux server, Redhat 6.2. Does someone have a script or point me in the right direction to then set up a cronjob that will email backup_database.gz to me?

I use this cron to tar a directory:

tar czpf /home/site/public_html/backup_data.gz /home/site/cgi-bin/program/data

If I want to add ../program/data2 and ../program/dir/dir2/data3 into the same archive, backup_data.gz, do I just add these pathnames at the end?

I had the question answered elsewhere on restoring data from a tar, but these were directions for restoring information from a single directory ("cd /path/to/data/.. # one directory behind data ... tar xzpf backup_data.tar.gz"). Would this restore method need to be changed if I had several directories all backed up into the one tar?

When restoring from a tar I would have probably already have had to re-install GMail and GForum. Will the tar overwrite any default data GMail/Forum has set up?

I would greatly appreciate any help in answering these questions.

Jason
Subject Author Views Date
Thread Backing up and emailing backups telemachus 2121 Jan 22, 2002, 6:22 PM
Post Re: [wickedmoon] Backing up and emailing backups
dearnet 2037 Jan 22, 2002, 11:28 PM
Post Re: [wickedmoon] Backing up and emailing backups
telemachus 2003 Feb 1, 2002, 3:12 PM
Post Re: [wickedmoon] Backing up and emailing backups
Paul 2002 Feb 1, 2002, 4:33 PM