+ if ( $this->hasOption( 'posdump' ) ) {
+ // Just dump the current position into the specified position dir
+ if ( !$this->hasOption( 'posdir' ) ) {
+ $this->error( "Param posdir required!", 1 );
+ }
+ $id = (int)$src->getJournal()->getCurrentPosition(); // default to 0
+ $this->output( "Current journal position is $id.\n" );
+ if ( file_put_contents( $posFile, $id, LOCK_EX ) !== false ) {
+ $this->output( "Saved journal position file.\n" );
+ } else {
+ $this->output( "Could not save journal position file.\n" );
+ }
+ if ( $this->isQuiet() ) {
+ print $id; // give a single machine-readable number
+ }
+ return;
+ }
+
+ if ( !$this->hasOption( 'dst' ) ) {
+ $this->error( "Param dst required!", 1 );
+ }
+ $dst = FileBackendGroup::singleton()->get( $this->getOption( 'dst' ) );
+