Aug 13, 2012

Redmine backup scripts

This is a short memo on how to setup a backup script for Redmine's
database and attachment,
running that script weekly on CentOS 6.3

# cat /usr/local/bin/redmine-backup.sh
#!/bin/bash

/usr/bin/mysqldump -uredmine -pNev123456 redmine | gzip >
/var/backup/redmine/db/redmine_`date +%y_%m_%d`.gz

rsync -a /var/www/redmine/files /var/backup/redmine/attachment

# cat /etc/redhat-release
CentOS release 6.3 (Final)

#yum -y install cronie

#cd /etc/cron.daily; ln -s /usr/local/bin/redmine-backup.sh

--
Best Regards,
Nguyen Hung Vu [aka: NVH] ( in Vietnamese: Nguyễn Vũ Hưng )
vuhung16plus{remove}@gmail.dot.com , YIM: vuhung16 , Skype:
vuhung16plus, twitter: vuhung, MSN: vuhung16.
http://www.facebook.com/nguyenvuhung
Nguyễn Vũ Hưng's blog on Free and Open Source:
http://nguyenvuhungvietnam.wordpress.com/
Học tiếng Nhật: http://hoc-tiengnhat.blogspot.com/
Vietnamese LibreOffice: http://libo-vi.blogspot.com/
Mozilla & Firefox tiếng Việt: http://mozilla-vi.blogspot.com/

Disclaimer: When posted to social networking groups include, but not limited Linux Users' Groups,
Free and Open Sources forums, mailing lists, the above is my personal opinion and is *not*
the opinion of my employer(s), associations and/or groups I join.

No comments: