duetbackup - CLI tool to backup your Duet SD Card [deprecated]
-
Release 1.2.0
And another one named v1.2.0 has been released to address the issue brought up by @mloidl.
To prevent removing directories not managed by
duetbackup
the tool will now create files named.duetbackup
in each directory it creates.If for example the user will then initialize a git repository inside the local backup directory the
.git
directory will be skipped when removing files that do not exist remote. -
7 Releases in 5 days - you guys are awesome in spotting issues! I really appreciate the feedback from all of you.
-
That was really fast.
Will test it when i'm at home on the machine. -
@mloidl Thanks. I borrowed the idea from tools like Dropbox or Syncthing that also use marker files (for different purposes but that doesn't matter) so it was only implementation and local testing effort.
Fun fact: while implementing everything worked immediately protecting unmanaged directories but strangely there was not a single marker file inside the directories after the tool had finished. It took me quite a while to figure out that I forgot to also exclude the marker file itself from being removed. It would even have worked this way since I create the file everytime I visit a managed directory but that would have been too much voodoo-magic-implementation to keep.
-
@wilriker said in duetbackup - CLI tool to backup your Duet SD Card:
@dc42 Still if the file is there
Content-Encoding: gzip
is wrong.This should be fixed in 2.03RC5 which I have just released.
-
Just tested 1.2.0 on Mac using a command file to automate the process and it works great.
For those interested in making a shortcut file to run instead of using the command line each time. It will create a time stamped directory to download the backup to. You can create separate shortcut files to run different backups, different printers, etc.
This is Mac specific, but similar could be achieved on other OS as well.
Save the following into a text file and save it with
.command
extension. You will need to modify the following script to suit your setup#!/bin/bash _timestamp=$(date +"%Y-%m-%d-%H%M") _filename="Backup-$_timestamp" cd "/PATH/TO/DUETBACKUP/duetbackup-darwin_amd64" ./duetbackup -domain duet.local -outDir "$_filename" -dirToBackup "0:/" -exclude "0:/gcodes"
You may need to make the resulting .command file executable for it to work from the Finder. In Terminal, navigate to the directory the .command file is in, and use
chmod +x FILENAME.command
to make it executable so you can double click on it from the Finder to run it. Change FILENAME to be whatever the filename you saved it as.Thanks @wilriker for the awesome backup tool!
-
Also tested v1.2.0 on linux. Works like a charm.
Thanks @wilriker for this awesome tool.
-
Uhm, might be that I'm dumber than the average in here, but i can't understand how to use this at all lol.
I'm on a Win10 system, and when i click the .exe it just open a commandline for 0.4sec and it disapears (same happens if i run it as admin). -
@exerqtor It's a command line tool. Clicking on it will - as you described - open the command window, show the error about missing parameters and immediately close it again.
You need to open the command line manually (open the start menu type
cmd
and hit enter). Then navigate to the directory theduetbackup.exe
sits in and use the parameters as described in the first post or runduetbackup --help
to get the list of available parameter with a short explanation on what their meaning is.
-
Ah, thx for the quick answer.
Not gonna spend time learing to use CLI in 2019, sure a nice tool for those who allready know how to use it though. -
If I am not too lazy I might prepare something for those that want GUI
At first I think I will leave excludes alone. For that I am definitely too lazy.
If Manuel agrees naturally.
-
@obeliks
That would be sweet for us simple/lazy people! -
imo "lazy" people should look into scheduled task on windows or cron on linux, no need for GUI and no need to remember to make the backup
-
-
@wilriker said in duetbackup - CLI tool to backup your Duet SD Card:
@obeliks It's open source so knock yourself out.
But you might want to wait until next week. I have a huge update and extension coming. @gtj0 will probably be very happy then.
Upload???????
-
@gtj0 said in duetbackup - CLI tool to backup your Duet SD Card:
Upload???????
Maybe... maybe more...
But now I am out for a long camping weekend. See you next week.
-
@wilriker said in duetbackup - CLI tool to backup your Duet SD Card:
@gtj0 said in duetbackup - CLI tool to backup your Duet SD Card:
Upload???????
Maybe... maybe more...
But now I am out for a long camping weekend. See you next week.
Have Fun!
-
On Windows, for those that struggle to 'cd' into the right directory: If you hold "Shift" while right clicking (inside the folder in Explorer), the popup menu will have an extra item: Command Prompt or Power Shell; it will for example be called "Open PowerShell window here" and when clicked will open it in the right directory.
Along with my duetbackup.exe package, I made plain .txt files with the commands I used for the backup (one for each duet), so that I can simply copy/paste (always using the same parameters):
.\duetbackup.exe -domain "duetname.local" -outDir ".\duetname" -password "duetpassword"
Command Prompt does not allow pasting, but the PowerShell does: first copy the command you want to use, then right click in the PowerShell window - it will auto paste.
Anyways, thank you @wilriker for this tool, it does what it says on the box, no issues found.
-
@jacotheron said in duetbackup - CLI tool to backup your Duet SD Card:
Command Prompt does not allow pasting
Not quite true? At least resent versions pastes if you do either of Ctrl + V, Shift + Insert or just right click in the window. Maybe you have a group policy setting that prevent it on your system?
-
If anyone would like to try it out. It is not yet tested, but it should work.
https://github.com/OBELIKS/duetbackupGUI/releasesThe code is not nice, but you can clean it up if you want. I will test it sometime today.