Re: [rt-users] ways to backup RT 4
Also some info in the documentation: https://bestpractical.com/docs/rt/4.2/backups.html On 12/15/15 8:36 AM, Bob Shaker wrote: While we're on the subject, I attached a script (as a .txt to get around email filters, but it's a bash script) I made some time ago that will backup the /opt/rt4, and use rt-serialize to create a backup of the DB. The mason cache is cleared by cron every morning at 2am, and this script runs at 3am. External services then send everything to cloud storage once it's collected into /backup. I'm not sure how reliable the return code-based error checking is, so there's log collection services that check the serializer log on their own. I'm open to suggestions. Hope the attachment goes through. -Original Message- From: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of Matt Zagrabelny Sent: Monday, December 14, 2015 4:44 PM To: Boris Epstein Cc: rt-users@lists.bestpractical.com Subject: Re: [rt-users] ways to backup RT 4 Hi Boris, On Mon, Dec 14, 2015 at 3:35 PM, Boris Epstein wrote: Hello listamates, Is there a way - by way or a script of plugin/extension of some sort - to back up the RT DB and configuration/custom images, etc. in one fell swoop? I'm not aware of any "one ring to rule them all" backup utility for RT. The training docs from BP reference: DB backups (mysql, pg, whatever) /opt/rt4, except /opt/rt4/var/{mason,session}_data /etc/aliases /etc/apache2 wherever your cronjobs live fetchmail config / mail relay config /etc -m ARDEN A Global Company Celebrating over 50 years of making your life more comfortable! This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. This OUTBOUND E-mail and Document(s) has been scanned by an Antivirus Server.
Re: [rt-users] ways to backup RT 4
While we're on the subject, I attached a script (as a .txt to get around email filters, but it's a bash script) I made some time ago that will backup the /opt/rt4, and use rt-serialize to create a backup of the DB. The mason cache is cleared by cron every morning at 2am, and this script runs at 3am. External services then send everything to cloud storage once it's collected into /backup. I'm not sure how reliable the return code-based error checking is, so there's log collection services that check the serializer log on their own. I'm open to suggestions. Hope the attachment goes through. -Original Message- From: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of Matt Zagrabelny Sent: Monday, December 14, 2015 4:44 PM To: Boris Epstein Cc: rt-users@lists.bestpractical.com Subject: Re: [rt-users] ways to backup RT 4 Hi Boris, On Mon, Dec 14, 2015 at 3:35 PM, Boris Epstein wrote: > Hello listamates, > > Is there a way - by way or a script of plugin/extension of some sort - > to back up the RT DB and configuration/custom images, etc. in one fell swoop? I'm not aware of any "one ring to rule them all" backup utility for RT. The training docs from BP reference: DB backups (mysql, pg, whatever) /opt/rt4, except /opt/rt4/var/{mason,session}_data /etc/aliases /etc/apache2 wherever your cronjobs live fetchmail config / mail relay config /etc -m ARDEN A Global Company Celebrating over 50 years of making your life more comfortable! This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. This OUTBOUND E-mail and Document(s) has been scanned by an Antivirus Server. #!/bin/bash #Description: Backup Request Tracker using rt-serializer #Created: 2014-11-24 #Author: Bob Shaker #Version: 1.0 #START TIME=$(date +"%y-%m-%d-%H-%M-%S-%Z") APP_FILENAME="rt-app-$TIME.tar.gz" APP_SRCDIR="/opt/rt4" DB_FILENAME="rt-serialize-$TIME.tar.gz" DESDIR="/backup/rt" #cleaning out the backups that are older than 14 days find $DESDIR -mtime +14 -exec rm {} \; # tar the /opt/rt4 directory and drop it into /backup/rt tar -cpzf "$DESDIR/$APP_FILENAME" "$APP_SRCDIR" #run the serializer and dump it into /tmp/tempbackup /opt/rt4/sbin/rt-validator --check && /opt/rt4/sbin/rt-serializer --directory /tmp/tempbackup --clone SERIALRETURN=${?} if [ $SERIALRETURN -eq 0 ] then echo "RT serialized backup is done." | mail -s "Backup Succeeded: Request Tracker" back...@companyname.com else echo "rt-serializer has encountered a problem backing up RT" | mail -s "Backup Unsuccessful: Request Tracker" back...@companyname.com fi #gzip the serialized db and copy it into /backup/rt tar -zvcpf "$DESDIR"/"$DB_FILENAME" /tmp/tempbackup #remove the temporary storage copy of the serialized db rm -rf /tmp/tempbackup #restart the mail services as well as the apache services service postfix restart service fetchmail restart service apache2 restart #END
Re: [rt-users] ways to backup RT 4
Hi Boris, On Mon, Dec 14, 2015 at 3:35 PM, Boris Epstein wrote: > Hello listamates, > > Is there a way - by way or a script of plugin/extension of some sort - to > back up the RT DB and configuration/custom images, etc. in one fell swoop? I'm not aware of any "one ring to rule them all" backup utility for RT. The training docs from BP reference: DB backups (mysql, pg, whatever) /opt/rt4, except /opt/rt4/var/{mason,session}_data /etc/aliases /etc/apache2 wherever your cronjobs live fetchmail config / mail relay config /etc -m
[rt-users] ways to backup RT 4
Hello listamates, Is there a way - by way or a script of plugin/extension of some sort - to back up the RT DB and configuration/custom images, etc. in one fell swoop? Thanks. Boris.