MT::BackupRestore::Backup

This callback is invoked when a user initiates a backup of one or more blogs. The callback is invoked once regardless of how many blogs were selected for backup. The handler for this callback should return the XML that should be appended to the end of the backup file.

Input Parameters

  • $cb - a reference to the current MT::Callback object handling this event.
  • $blog_ids - an array of integers representing the list of blogs the user has requested to have backed up. If the array is empty, it is an indicator that the user has requested to have everything backed up.
  • $progress -

Return Value

A string of valid and well-formed XML. The value returned will be appended to the end of the backup file.

Example Handler

sub backup_handler {
    my ($cb, $blog_ids, $progress) = @_;
    my $xml = '';
    # do my thing
    return $xml;
}
This page was last updated on 2008-10-01, 16:59.

Leave a note

Have a question? Please use the MT Forums. Notes submitted on documentation should pertain to tips & hints regarding documentation. Your note may be removed once its contents have been integrated into the body of the page.