February 28, 2007
Older: Open Up Your ID With Rails
Newer: Renaming RHTML to ERB
Helpful Railsmachine Scripts
Andrew Stewart just emailed me about a few scripts he has written which help with general maintenance and backups of railsmachine servers (or any server that has a similar setup, such as a slicehost account setup with deprec).
He currently has four scripts linked in the post:
- Backup All Production Databases
- Rolling Over Log Fles
- Clearing Out Sessions
- Dumping Subversion Repositories
If you have a railsmachine account or similar setup, definitely check them out. For those that don’t know, Andrew is the author of the css_dryer plugin.
3 Comments
Feb 28, 2007
Useful scripts, but it seems that rake would be a better environment for these tasks, especially since it’s built into Rails?
Also, logrotate does a great job of rotating logs and is installed on RailsMachine. Here’s what I use in /etc/logrotate.d/mongrel:
/var/www/apps/myapp.com/shared/log/*log {
daily
rotate 7
compress
missingok
sharedscripts
postrotate
/etc/init.d/mongrel_cluster restart
endscript
}
Mar 01, 2007
@topfunky – Agreed. I’m planning on moving them into rake tasks when I set them up on my account.
I didn’t know about logrotate. Thanks for the logrotate script.
Mar 01, 2007
@topfunky – good point. I didn’t know about logrotate either. That’s a good tip.
@John – I look forward to replacing my scripts with your Rake tasks!
Sorry, comments are closed for this article to ease the burden of pruning spam.