Backing Up Freeside

Mike Hayward hayward at loup.net
Wed Sep 22 12:56:18 PDT 1999


Seems to me the script in fs-1.2.2 to back up freeside doesn't back up
all freeside state.  I'm assuming fs needs the state in the
/usr/local/etc/freeside/counters... directory to maintain the db
correctly.  Does this sound right?

For a future release, it might be better to store all state,
especially counters, in the database since it addresses the following
three issues.

- Modifying files without locking from simultaneously executing perl
  scripts creates a race condition and may corrupt the counters.
- Unless you use nfs, only one webserver can use an instance of
  freeside.
- Only one copy of freeside can be installed on a machine.  This
  would seems to make migration to new versions, etc. difficult.

This is just an architectural suggestion, perhaps I'm out of line.

Following is a suggestive script of how to backup the entire state for
fs-1.2.2, if indeed the counters & configuration are important.

- Mike

----original: backup-freeside---------------------------------------------------
#!/bin/sh
/etc/init.d/apache stop
/etc/init.d/mysql stop
tar czvf var-lib-mysql-`date +%y%m%d%H%M%S`.tar.gz /var/lib/mysql
/etc/init.d/mysql start
/etc/init.d/apache start

----modified: backup-freeside---------------------------------------------------
#!/bin/sh
apachectl stop
mysqldump -t freeside > fs-backup.sql
apachectl start
tar -Pzcvf fs-backup-`date +%y%m%d%H%M%S`.tgz fs-backup.sql /usr/local/etc/freeside/
rm fs-backup.sql




More information about the freeside-users mailing list