# Take a PB Backup

**URL:** <https://forum.electromage.com/t/take-a-pb-backup/1246>\
**Category:** Uncategorized\
**Created:** [May 17, 2021, 5:08pm UTC](https://forum.electromage.com/t/take-a-pb-backup/1246 "2021-05-17T17:08:31Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ddave47](https://forum.electromage.com/letter_avatar_proxy/v4/letter/d/8e7dd6/32.png) [@ddave47](https://forum.electromage.com/u/ddave47)\
**Post date:** [May 17, 2021, 5:08pm UTC](https://forum.electromage.com/t/take-a-pb-backup/1246/1 "2021-05-17T17:08:32Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![wizard](https://forum.electromage.com/user_avatar/forum.electromage.com/wizard/32/4_2.png) [@wizard](https://forum.electromage.com/u/wizard)\
**Post date:** [May 17, 2021, 6:09pm UTC](https://forum.electromage.com/t/take-a-pb-backup/1246/2 "2021-05-17T18:09:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jeff](https://forum.electromage.com/user_avatar/forum.electromage.com/jeff/32/3473_2.png) [@jeff](https://forum.electromage.com/u/jeff)\
**Post date:** [May 18, 2021, 12:49am UTC](https://forum.electromage.com/t/take-a-pb-backup/1246/3 "2021-05-18T00:49:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![sorceror](https://forum.electromage.com/user_avatar/forum.electromage.com/sorceror/32/735_2.png) [@sorceror](https://forum.electromage.com/u/sorceror)\
**Post date:** [May 18, 2021, 4:45pm UTC](https://forum.electromage.com/t/take-a-pb-backup/1246/4 "2021-05-18T16:45:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Nick\_W](https://forum.electromage.com/letter_avatar_proxy/v4/letter/n/958977/32.png) [@Nick\_W](https://forum.electromage.com/u/Nick_W)\
**Post date:** [May 18, 2021, 5:04pm UTC](https://forum.electromage.com/t/take-a-pb-backup/1246/5 "2021-05-18T17:04:32Z")

</div>

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

> **[NickWaterton/Pixelblaze-Async](https://github.com/NickWaterton/Pixelblaze-Async)**
>
> An MQTT interface and async Client for Pixelblaze devices

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.

---

<div class="post-metadata">

**Author:** ![pixie](https://forum.electromage.com/letter_avatar_proxy/v4/letter/p/7bcc69/32.png) [@pixie](https://forum.electromage.com/u/pixie)\
**Post date:** [August 6, 2021, 8:22pm UTC](https://forum.electromage.com/t/take-a-pb-backup/1246/6 "2021-08-06T20:22:56Z")

</div>

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

I noticed in the [problems updating PB3 to v3.18](https://forum.electromage.com/t/stuck-updating-pb3-prob-with-low-space/1414/5) 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?

---

<div class="post-metadata">

**Author:** ![wizard](https://forum.electromage.com/user_avatar/forum.electromage.com/wizard/32/4_2.png) [@wizard](https://forum.electromage.com/u/wizard)\
**Post date:** [August 6, 2021, 8:49pm UTC](https://forum.electromage.com/t/take-a-pb-backup/1246/7 "2021-08-06T20:49:14Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![pixie](https://forum.electromage.com/letter_avatar_proxy/v4/letter/p/7bcc69/32.png) [@pixie](https://forum.electromage.com/u/pixie)\
**Post date:** [August 6, 2021, 8:54pm UTC](https://forum.electromage.com/t/take-a-pb-backup/1246/8 "2021-08-06T20:54:20Z")

</div>

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…
