Here is the script, bbb-record --watch result and the post_publish.log. I see post_publish_recording_ready_callback.rb runs correctly.
Script:
#!/usr/bin/ruby
# frozen_string_literal: true
require 'optparse'
require 'psych'
require 'fileutils'
puts('Published recording copy starts')
meeting_id = nil
target_base_dir = '/mnt/data/presentation'
published_dir = '/var/bigbluebutton/published/'
OptionParser.new do |opts|
opts.on('-m', '--meeting-id MEETING_ID', 'Internal Meeting ID (required)') do |v|
meeting_id = v
end
end.parse!
unless meeting_id
msg = 'Meeting ID was not provided'
puts(msg) && raise(msg)
end
puts("Copying published recordings for meeting ID: #{meeting_id}")
format_dirs = []
FileUtils.cd(published_dir) do
format_dirs = Dir.glob("*/#{meeting_id}")
end
if format_dirs.empty?
puts("No published recording formats found for meeting ID: #{meeting_id}")
exit
end
format_dirs.each do |format_dir|
source_path = File.join(published_dir, format_dir)
target_path = target_base_dir
puts("Copying from: #{source_path} to: #{target_path}")
FileUtils.mkdir_p(target_path) unless Dir.exist?(target_path)
begin
FileUtils.cp_r(source_path, target_path)
puts("Successfully copied '#{File.basename(source_path)}' to '#{target_path}'.")
rescue StandardError => e
puts("Error copying '#{File.basename(source_path)}': #{e.message}")
end
end
puts('Published recording copy ends')
bbb-record --watch result:
<InternalmeetingId> Sat 26 Apr 2025 08:42:45 PM UTC X XXX X XX 15 presentation presentation <externalId>
tail -f /var/log/bigbluebutton/post_publish.log:
Recording Ready Notify for [<InternalmeetingId>] starts
Task: Getting meeting metadata
Making callback for recording ready notification
Task: Getting external meeting id
Task: Getting meeting metadata
Recording notifier successful: <InternalmeetingId> (code 200)
Recording Ready notify ends