Take a PB Backup

Is there an easy way to take a backup of all of my patterns and settings? So if I get a new PB, I can just copy some files over and it is up and running?

thanks!

Not in whole. You can export patterns, but there isn’t a method for backing up settings. Firestorm also has a way to download pattern binaries, which can be pushed back to a PB to reinstall them and bypass the usual restore method via the editor. That might be more work for a single PB though.

I will add that as long as you have one spare Pixelblaze to act as the backup storage, I think Firestorm’s “Clone all patterns to…” feature saves a ton of time for this purpose. It’s all UI, no API (unlike the binary export). Then, configuring the settings page is under a minute of manual work.

1 Like

Ultimately, the web UI could handle drag-n-drop of patterns between Pixelblazes. :relaxed:

The python library has stand alone programs save_load_pattern, clone, and backup_restore in examples.

These take a PB ip address (except clone which takes a source and destination PB address), and list of patterns as input. if no pattern is given all patterns are assumed.

backup_restore saves/restores to/from a zip file.

You can save from one PB and restore to another, or clone patterns from one PB to another (if you don’t give a pattern or list of patterns, all patterns would be cloned).

This is only useful if you have python 3 on your computer though.

2 Likes

@wizard, I too am interested in making backup/restore/provisioning easier.

I noticed in the problems updating PB3 to v3.18 thread that it’s possible to GET and POST patterns through the web server.

Elsewhere, I saw in someone’s Github (could have been yours, Jeff’s, Scruffynerf’s, zRanger’s or Nick_W’s) that it’s possible to get the UI slider settings from the web server by adding “.c” to the pattern URL, and I’ve found that the settings page values are returned from the webserver as “/config.json” and the pixelmap as “/pixelmap.txt”.

My question is: can those items be written by a POST to the web server, or only via websockets?

Yes, a basic GET/POST/DELETE API exists for access to files, though no listing API exists (outside of pattern list via websocket). I think I get where you are going…

Writing to config.json or any of these files does not change what is loaded, and doing anything in the UI would overwrite changes, so you’d need to reboot it for anything to take.

There are other config files for e.g. output expander config (obconf.dat) and the pixel map binary (pixelmap.dat).

The web app also has favicon.ico and apple-touch-icon.png used for browser tabs/bookmarks and homescreen icons.

Patterns are stored in the /p/ directory. The pattern binary file is named after it’s ID with no extension, and the .c file has controls JSON and future config.

Playlists are stored in /l/ directory. There’s only one right now, called _defaultplaylist_ and would likely have an ID based name of 17 characters (like patterns).

2 Likes

So it might be possible to do a whole clone/provision with CURL? Cool! I’ll put it on the list of things to tinker around with – which, I happily confess, never gets any shorter…

2 Likes