How take auto backup of config with password export

fahadshery

Contributor
Joined
Sep 29, 2017
Messages
179
Hi,

I have looked at this long thread but still a little confused...
I can take my configs backup by simply going to the GUI (System -> General) and then Save config backup... tick the box for password seed and that's it.
I want to do it automatically. Maybe using a cronjob.
What's the easiest way to do it?

Cheers
 

nickryand

Cadet
Joined
Mar 4, 2021
Messages
1
I had the same question so I read up on the API and write a small python script: https://github.com/nickryand/truenas_config_backup

I have successfully used this script to generate a backup file with the secretseed, pool_keys and root_authorized_keys. My use case was to use the script as a `pre-script` to a cloud sync that encrypted and uploaded the backup to cloud storage.

I hope it helps.
 
Top