REB_Backup.sh - Back Up to USB
Rose Engine Butler’s Key Programs: Overview · REB_Launch.sh · REB_Settings.sh · REB_Backup.sh · REB_Update.sh · REB_Change_Network.sh · REB_Install_Debian_13_Trixie.sh
Purpose
REB_Backup.sh starts Back Up to USB, a small window that copies the operator's own files onto a USB memory stick: the settings, G-code programs, custom HAL file and tool table. Everything else can be reinstalled from GitHub, so these are the files that matter if the Raspberry Pi's SD card fails.
How it is run
- The Back Up to USB desktop icon, and Applications > Rose Engine Butler.
- From a terminal:
|
/home/reuben/linuxcnc/configs/RoseEngineButler/REB_Backup.sh |
Parameters
None.
Using it
- Insert a USB stick. It appears in the window within a couple of seconds (one opened before the stick goes in is fine).
- Choose the stick if more than one is shown, and click Back Up.
- Wait for Safe to remove before pulling the stick out.
What it copies
| From the Raspberry Pi | To the stick |
| /home/reuben/Documents/*.ini (REBset_v1.ini and saved or exported settings) | Documents/ |
| /home/reuben/linuxcnc/configs/RoseEngineButler/gcode/ (all files and subfolders) | gcode/ |
| .../RoseEngineButler/REB_Custom/REB_Custom.hal and REB_Tool.tbl | REB_Custom/ |
| /home/reuben/linuxcnc/nc_files/ (all files and subfolders; links to LinuxCNC's own examples are skipped) | nc_files/ |
A folder missing on this machine is skipped and noted in the log. The list is BACKUP_SOURCES at the top of REB_Display/REB_Backup.py.
Files it creates
On the stick, a new folder every time - an earlier backup is never overwritten:
|
REB_Backup/YYYY-MM-DD_HHMM/ |
backup_log.txt lists every file copied and anything that failed. Nothing is written on the Raspberry Pi itself.
Programs it calls
| Program | What for |
| REB_Display/REB_Backup.py | The program itself (Python 3, GTK 3). |
| pgrep | Checks whether LinuxCNC is running. |
| udisksctl | Unmounts and powers off the stick when the backup is finished. |
It finds the stick by reading /proc/mounts for the desktop's automount folders (/media/... or /run/media/...).
Notes for support
- Stick not seen: it must be mounted by the desktop - check it opens in the file manager. Only drives mounted under /media or /run/media count, so the SD card and network drives never appear.
- Back up with no program cutting. If LinuxCNC is running the window warns but still allows it: heavy USB copying can disturb the realtime motion timing.
- Restoring: there is no restore program yet. Copy the files back by hand to the same folders (LinuxCNC closed), then start Rose Engine Butler. For REBset_v1.ini, REB Settings' Load Settings is the safer way.
- The Raspberry Pi's whole SD card is not backed up - a failed card is replaced by reinstalling (REB_Install_Debian_13_Trixie.sh) and then copying these files back.
- Not to be confused with an older REB_Backup.sh (deleted 6 August 2026) that backed up a RoseEngineButlerLocal folder.
|
eMail comments to |
