Backup Script for Mac OS X experiences?
iandw.au at gmail.com
Tue Mar 19 15:48:00 PDT 2013
On 20/03/2013, at 6:04 AM, Lawrence Velázquez wrote:
> On Mar 19, 2013, at 7:47 AM, Niels Dettenbach <nd at syndicat.com> wrote:
>> The user runs a software whose developer told him that he should not use
>> TimeMachine (not shure why, - may depend from the database / data storage
>> concept behind that piece of proprietary software).
> It would be worth ascertaining the precise reasoning behind this before moving forward. If Time Machine presents a problem for this software, it's entirely possible that other backup solutions could present similar problems.
Time Machine is excellent in my experience so far, but it will only back up *files*
that happen to have changed since the last Time Machine backup, excluding
(in the Preferences) folders that are bulky but easy to recreate.
For an active database, that might be *all* the files in their entirety. I think most
database systems have inbuilt backup options, such as whole database (infrequently),
transaction log (more frequently) or actual files (which might be in an inconsistent
state at the moment a Time Machine type of backup finishes).
It is explained fairly well in a series of articles here (for a database system your user
is unlikely to be using … :-) … ), but the general principles apply:
I'd say the thing to do is to set up scripts or database commands that do an
internal database backup at regular intervals, using the conventions your
user's database management system (DBMS) provides (MySQL or whatever).
Then set up Time Machine to back up the *output* of the database's backup but
*exclude* the database itself (i.e. its underlying file(s)), because the DB likely to be
in an inconsistent state during the interval when Time Machine does a backup.
Alternatively, you could just accumulate the DBMS' backup on another disk
or perhaps on TM's disk. You would also need scripts or DBMS commands to
be run after you have got back the DBMS' backup files.
It is all "horses for courses", depending on the size of the database, whether
it is "all one file" and what the transaction rate is (from a few per day to 100s
per second). IOW how much end-users' work are you (and the users) prepared
to lose if the database loses its transaction log?
For example, at the low end of the scale, a database that is all one file, has just
a few transactions per day and is not used overnight, could safely be copied and
renamed into a backup folder at the end of the working day and picked up there
by Time Machine.
Hope this helps, Ian W.
More information about the macports-users