We recommend exporting your rules for backup purposes. This way you can restore your rules if they are accidentally lost for some reason.
You can export the rules from the dashboard:
With our cli tools: https://github.com/algolia/algolia-cli#10-export-rules--exportrules (you will need to redirect the output to a file)
Or you can write your own script for this using out API clients: https://www.algolia.com/doc/api-reference/api-methods/export-rules/