Backup Assistance for BBUS


Recommended Posts

Hello Everyone:

Some time ago, I posted A Question about Server upgrade and Backup Since that time, I have upgraded the system to include all upgrades to the relevant files, have installed and configured Wordpress, upgraded it to 3.04 and have run the sytem update utility so that all my debian files are up to date as of this posting.

I have also ran the update utility for webmin and have upgraded to the next version (Webmin version 1.530) and have performed the update that it wanted. Now, I want to command the system to do the following.

1. Backup MYSQL Databases for BBUS' Blog

2. Backup the BLOG files, etc on BBUS - (/var/www/blog/

3. Backup all website files - (/var/www/

4. Backup all files in /etc/

5. Backup all files in /var

6. Backup all files in /home/

7. Backup additional files that the Linux Gurus think are necessary

Then, I want to Make the system drop files to /home/baker7/backup.Date/ and have the /var/, /var/www/, and /var/www/blog/ directories have the information. These files should be TAR files, and available by going to the directory and searching the backups by date. I also want to have the blog database backed up as well as the /home directory files. so you have files that look like this:

etc-Date.tar

Var.Date.tar

www-Date.tar

blog-Date.tar

home-Date.tar

Database-Date.tar

misc-files-Date.tar

I may not know how to make the script to do this, but I have a pretty good idea of what I want to do - Then I will back these files UP onto my 1TB WD drive and then burn the backups to disc later. I also want to be able to delete the older files if they are still there - This is so I don't bork it and have a system that is missing files. In the event of a crash, then I should be able to run an undo script as well, but I want to automate this, so that it does it on a schedule and so if I crash, I don't have to ding around with usernames, passwords, permissions, etc. If this script can be run on a regular basis and I can make sure these files don't get corrupted, I will ALWAYS have the backups. Last time I did this, I did it manually, and it took a few hours.

Can anyone give me an idea of how to do what I want, and or recommend any other files that should be backed up? I want to do this sometime in the next couple weeks.

Thanks for any assistance you can provide ;)

Brian

Link to post
Share on other sites

Good Afternoon Everyone:

I have attempted to backup BBUS by following the instructions HERE. In those instrructions, it tells me to do the following as a ONE line command


tar -zcvpf /archive/full-backup-`date '+%d-%B-%Y'`.tar.gz \ --directory / --exclude=mnt --exclude=proc --exclude=var/spool/squid .

Of course, I have a different system partition that I want to use for the backup, so I want to use it like this:


tar -zcvpf /home/admin/fullbackup/full-backup-`date '+%d-%B-%Y'`.tar.gz \ --directory / --exclude=mnt --exclude=proc --exclude=var/spool/squid .

I get '/home/admin/fullbackup/full-backup-' (missing the Dates on this, as well as the file extension that indicates the TAR.GZ - very important, right? However the syntax appears to be incorrect.

When I do that, I get a file that is lasking the Date as shown above, because I think there is a problem with my syntax. so I went to another site and grabbed a syntax that goes like this:


tar -zcvpf /home/admin/fullbackups/fullbackup.tar.gz --directory=/ --exclude=proc --exclude=sys --exclude=dev/pts --exclude=fullbackups .

I had to remove the DATE stuff from the syntax before she would work right, and I need to make sure that the dates and times are there., so I used the 2nd example for this and got a file that looks like this:


-rw-r--r-- 1 root root 1883226126 2011-02-09 12:32 fullbackup.tar.gz

What I want to do is to set up a script that I can run as cron that will do a FULL BACKUP once month, and an incremental backup that will pick up the important directories that have stuff change every week. Then I want to have these dated and timestamped in case there is some sort of failure, and delete the older files. but I have no idea how to write such a script - can someone possibly assist me with this, so I do NOT backup backups of files move then once?

What I want to do is streamline backups so that I can rasily manage and restore them.

Thanks for any help you all can provide ;)

Brian

Edited by baker7
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...