|  Developer
Updated on November 23, 2021

backup module API ( require “backup” )

Edit
  • Subscribe a script for backup events, optionally specifying event filter rules. After subscribing the script will be launched for each event happens on a backup service and information about this event will be passed as a parameter.
Edit
Edit
  • script name (string), events_filter (table)
Edit
  • subscriber_id (string).
Edit
				
					require "backup"

backup.subscribe( "HUB:my_plugin/scripts/events_handling" )				
			
Edit
Edit
  • subscriber_id: string
    filter_rules: table (array)
Edit
  • nil
Edit
				
					require "backup"

backup.subscribe("HUB:my_plugin/scripts/events_handling")
backup.set_subscription_filters("HUB:my_plugin/scripts/events_handling", { { event = "backup_creating_started" } } )				
			
Edit
  • Unsubscribe a script from backup events.
Edit
Edit
  • subscriber_id (string).
Edit
  • none.
Edit
				
					require "backup"

backup.unsubscribe( "HUB:my_plugin/scripts/events_handling" )