Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set up on Mac for ultra-newbies #2

Open
SATResearch opened this issue Jul 31, 2020 · 0 comments
Open

How to set up on Mac for ultra-newbies #2

SATResearch opened this issue Jul 31, 2020 · 0 comments

Comments

@SATResearch
Copy link

SATResearch commented Jul 31, 2020

How to use this auto backup feature on a Mac

  1. Create a folder on your hard drive where you want backups to be stored and give it a name that makes sense (e.g. RCbackups). Do not use any spaces since we will be using this name in the Terminal application.

  2. In your browser, go to https://github.com/wilriker/rfm/releases and download this file: rfm-darwin_amd64.tgz

  3. Find the file in your Downloads folder and unzip it by double-clicking on it. Open the folder that it created (it's called rfm-darwin_amd64).

  4. Drag the file called "rfm" from the rfm-darwin_amd64 folder to the folder you created in step 1 above.

  5. copy the below text and paste it into a new file in the TextEdit application on your Mac in text only mode (note, you can change a document to text only format under the Format menu in TextEdit, or use command-shift-t):

DUET=192.168.0.100
FILE=railcore_backup             
NAME=${FILE%.*}
DATE=`date +%y-%m-%d`         
NEWFILE=${NAME}_${DATE}
mkdir $NEWFILE
./rfm backup -domain $DUET -exclude 0:/gcodes ./$NEWFILE 0:/
tar -zcvf $NEWFILE.tar.gz $NEWFILE
rm -rf $NEWFILE
  1. Edit the text to have the correct IP address for your Duet. It is recommended that you use an assigned IP address for your Duet, which can either be done with gcode in the config.g, or in your router settings (which is easier). You will have to look up how to do this in your router's owners manual. Look for how to assign IP addresses in the manual.

  2. Save your TextEdit file to the same folder you created in Step 1 above and give it this name: rcbackup.sh
    Note: Do NOT put ".txt" at the end of this file, name it exactly "rcbackup.sh" (no quotes).

  3. Open Terminal and navigate to your folder created in Step 1. If you don't know how to do this, read on, otherwise skip to Step 9. In Terminal, type the command "ls" (without quotes, stands for list) and press return. This will give you a list of files and folders at your current directory. In there you should see the folder you created or the folder in which you created your folder. For example, I put my RCbackups folder in my Documents folder, so at this step, I see my Documents folder and other folders at its same directory level. Now type "cd" (no quotes, stands for change directory) and the name of the folder you want to go into and press return. Type "ls" (no quotes) and press return. Continue this process until you are in your backups folder you created in Step 1 and when you type "ls" you get the rcbackup.sh file and the rfm file. Hint: if you type the first few letters of the folder you want to move to, then press the tab key, the Terminal will autofill the whole name (capitals count).

  4. In the Terminal window, type "ls -lt" (no quotes) and press return. You will get a list of permissions associated with the files. We need permission to execute both of the files in the folder. The rfm file likely already has several x's before the file name so we don't need to change that, but the rcbackup.sh file likely has something like this ahead of it: rw-rw-rw

  5. type "chmod +x rcbackup.sh" (no quotes) and press return.

  6. type "ls -lt" (no quotes) again and confirm that there are x's now with the rw's like so: rwxrwxrwx

  7. In the finder, double click on the rfm file. Your Mac will likely tell you that it won't run it because it was downloaded from the internet. Click on the Help (?) icon in that popup window and click on the link that says "Open the General pane for me" and allow your Mac to run the program.

  8. In the Terminal application, type "./rcbackup.sh" (no quotes) This should backup your Duet. From now on, this is how you do the backups, just repeat this step and you're done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant