SBC plugin to backup Duet3d files
-
This plugin provides periodic or instant backups of duet3d SBC files. Backups are made to a Github repository, thereby facilitating the ability to roll back to earlier file versions.
Modes of operation
There are two modes of operation, depending on whether the archive option is used.Files deleted from the source are deleted from the main branch (default)
The designated directories are compared to the files in themain
branch. Files are either Added (new files), Updated (if changed), or Skipped (if not changed). Files that have been deleted from the designated directories are removed from themain
branch. In this way, themain
branch is a snapshot of the designated directories.If you need to recover to the latest version - a simple download of the top level
main
branch is all that is needed.Github history still provides access to previously deleted files.
Files are not deleted from the main branch
The behavior is the same as above, except that files which are deleted from the source are NOT deleted from the main branch. This makes recovery a little more involved.Prerequisites:
SBCV3.5.0-rc.1
Tested with Debian Bullseye
Python3
To use the plugin:
1- Create a new repository (Private is recomended) on Github. Include a Readme.md file. Take note of the name of the repository (including case) as well as the branch, which will usually be main.
2- Create a personal access token token. A classic token with "repo" authorization is sufficient. Instructions for creating a token can be found here:
https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens3- Create(using DWC) a file
System/duetBackup/duetBackup.config
details are in the file Config Notes.4- Install the plugin using the plugin.zip file from here:
https://github.com/stuartofmt/duetBackup5- To create an initial backup, set
-days 0
and-hours 0
. This will run duetBackup once. After that, set-days
and-hrs
to your prefered backup interval. Note that if there are no changes to any files, backup does nothing.Versions
V1.0
- Initial release
V1.1
- Added messages, sent to DWC
- Displays time to next backup using local time (previously GMT)
- Added
-duetPassword
to support for printers that use a password - Added
-verbose
to enable more detailed log messages.
V1.2
- Added
-noDelete
option - Compares files to determine if an update is needed.
- Added date / time of last change to file (except initial save).
V1.3
README.md
file shows date and time of last backupREADME.md
prevented from being deleted- Added
-ignore
. Can specify files that are not to be backed up. This also causes these files to be deleted unless-noDelete
is set.
-
Added some embelishments and tidy up.
V1.1
- Added some status messages, sent to DWC
- Next backup time is displayed using local time (previously GMT)
- Added
-duetPassword
for folks that use a password - Added
-verbose
to enable more detailed log messages.
-
-
V1.2
Some improvements that facilitate two modes of operation (see desription in iniial post above). Better identification of when individual files were Added, Updated, etc
- Added
-noDelete
option - Compares files to determine if an update is needed.
- Added date / time of last change to file (except initial save).
- Added
-
V1.3
README.md
file shows date and time of last backupREADME.md
prevented from being deleted- Added
-ignore
. Can specify files that are not to be backed up. This also causes these files to be deleted unless-noDelete
is set.
-
@stuartofmt Thanks for your effort, please consider submitting it to https://plugins.duet3d.com/ as well
-
@chrishamm said in SBC plugin to backup Duet3d files:
@stuartofmt Thanks for your effort, please consider submitting it to https://plugins.duet3d.com/ as well
Hi. I have tried to submit it but it gets summarily rejected. My guess is that its looking for a specific folder structure on github ... (or something) ... The submission instructions are unclear on this aspect.
I have raised an issue (twice) on github. I asked about the problem on the forum (11 days ago) and it was refered to @yasas but there has been no reply.
-
@stuartofmt Oh, sorry to hear, I'll make sure this is addressed ASAP.
-
@stuartofmt The reason why it cannot be approved is because there is no GitHub release on your repository:
You must create one before you can submit it on the plugin repository. Note that this release must contain your plugin ZIP since that is linked by the plugin repo.
-
@stuartofmt Hi @stuartofmt I'm sorry to hear this I have missed the GH issues as for some reason they have been closed/wasn't notified. I will update the error messages in case someone else runs into the same issue.