Re: [rt-users] Backing up RT

2011-01-05 Thread Andy Graybeal

We use mysqldump and logrotate to keep a week of DB dumps on the local
filesystem, we perform daily backups to a VTL and then tape, and we also
perform nightly SAN snapshots on the RT host's LUN (making sure to lock
the databases before the snapshot, and then unlocking after so the MySQL
DB files are in a consistent state during the snap).


Wow, you have a complicated system.  I was considering backing up the 
whole machine with LVM snapshots, but I don't think I have the space 
overall to deal with full machine snapshots.


If I ever ended up doing LVM snaps, do I need to lock the db first... 
or can I get away with not locking the db with LVM snaps?


You use logrotate to manage your mysqldumps!  Excellent idea.
I need to learn logrotate.  I was wondering how I can keep mysqldumps 
from each day and not lose control of them.  I'm excited.


Thank you for your response.  (I need to google VTL)

-Andy


Re: [rt-users] Backing up RT

2011-01-05 Thread Andy Graybeal

This is exactly what I do.  Is this a decent way to be doing it -- I've
always just assumed it was okay.  I do it hourly, and then SCP it to
another system.

Should I be stopping mysql or anything  before doing the mysqldump?
--


Max,
What made you do hourly dumps?   I'm thinking now instead of nightly, I 
should be doing hourly dumps like you.


-Andy


Re: [rt-users] Backing up RT

2011-01-05 Thread Andy Graybeal

On 01/05/2011 09:07 AM, Max McGrath wrote:

I forgot to mention, I also backup a few other files/folder critical to RT:

##
#   BACKUP DATABASES #
##
mysqldump -u root rt3  rt3_backup.sql
mysqldump -u root mysql  mysql_backup.sql
#mysqldump -u root information_schema  information_schema_backup.sql

##
#  COPY OTHER FILES/FOLDERS  #
##
cp /etc/aliases /opt/rt3/lib/RT/rt-backup/
cp /etc/apache2/httpd.conf /opt/rt3/lib/RT/rt-backup/
cp /opt/rt3/etc/RT_SiteConfig.pm /opt/rt3/lib/RT/rt-backup/
cp -r /opt/rt3/local/ /opt/rt3/lib/RT/rt-backup/

This way I have a copy of my e-mail addresses for my queues, my apache
config, my SiteConfig, and my whole local folder
--
Max McGrath
Asst. Network Admin/Systems Specialist
Carthage College
262-552-5512
mmcgr...@carthage.edu mailto:mmcgr...@carthage.edu



Max, thank you for the list.  I will follow your footsteps.

-Andy


Re: [rt-users] Backing up RT

2011-01-05 Thread Andy Graybeal

On 01/05/2011 09:23 AM, Konstantin Khomoutov wrote:

On Wed, 05 Jan 2011 07:36:46 -0500
Andy Graybealandy.grayb...@casanueva.com  wrote:



If I ever ended up doing LVM snaps, do I need to lock the db first...
or can I get away with not locking the db with LVM snaps?

In this case locking is less important than flushing as you would be
backing up the filesystem and hence you will need the on-disk database
representation to be consistent before taking the snapshot. To do this,
you either have to stop the server just before taking a snapshot, or
write a complicated script which would work just like mysqlhotcopy but
would take the snapshot instead of copying the data.
Note that mysqlhotcopy explicitly states it works only with MyISAM and
ARCHIVE engines, and the comments on [1] hint that backing up InnoDB
this way is at least tricky and error-prone.


Argh.. Thank you for the knowledge. This is too much for my plate at the 
moment.  I'll put off the LVM snaps until needed and stick with config / 
db backups for now. Thanks again.





You use logrotate to manage your mysqldumps!  Excellent idea.
I need to learn logrotate.  I was wondering how I can keep mysqldumps
from each day and not lose control of them.  I'm excited.

One commonly used straightforward approach is to encode the formatted
timestamp into the names of generated backup files, like this:
$ mysqldump ... | gzip -c/path/to/db-backup-$(date +'%F-%T').sql.gz


Wonderful, I will make use of this technique.  I have seen and used this 
technique just last week. Though the addition of gzip is a spin on what 
I saw.  I like it.  Here's what I used: `date +%Y%m%d%H%M%S`.xml out of 
the PF book or website.




1. http://dev.mysql.com/doc/refman/5.0/en/lock-tables.html



Again, thanks for the response.  Very helpful.

-Andy


[rt-users] Backing up RT

2011-01-04 Thread Andy Graybeal

Greetings,
I need a recommendation for backing up RT.

I am planning on using a cron job to run mysqldump to dump the db, then 
rsync the db and /etc/ conf files to a host that runs a backup job every 
night to tape.


What do you guys do?

-Andy