It is interesting as an option to use as the target path a mounted volume to use another server as a backup repository or storage.

I created a "SCRIPTS" subfolder on my user $HOME. Choose the location to save your script and then, add execution permissions.

# chmod +x /home/admin/SCRIPTS/migrate_export.sh

Test it by launching it manually to ensure it works like you want. Then we can continue with the next step

Schedule the backup periodically

This is a light and fast backup so that we can schedule it to be executed once a week for example.
This example shows an schedule configuration every monday at 7:00 that can be done via Gaia WebUI or command:

Gaia WebUI

System management – Job Scheduler – Add

Gaia command

When the recurrence is weekly: To specify the days, enter the day by number: 0 is Sunday and 6 is Saturday.
When the recurrence is monthly: To specify the days, enter the day by number: 1 to 31.
Separate several days with commas. For example: for Monday and Thursday enter 1,4