IFC/BB Backups

This discussion was created from comments split from: Large scale infrastructure project with BlenderBim.
«1

Comments

  • edited December 2023

    @Moult said:
    …Be sure to keep lots of backups when things break!

    Good morning. Concerning BACKUPS is there any special reason why BB don’t have autogenerated backups like Revit and many other softwares have? If it’s possible to have .ifc backup files for BB then you may have to consider its implementation, it will save a lot of headaches!

  • @Owura_qu you can use the git function in blenderbim to make as many backups as you like

  • edited December 2023

    @Owura_qu you can use the git function in blenderbim to make as many backups as you like

    Okay, that may very much help. I may have to explore it further. Any documentation or resource you may recommend? Thank you.

  • It seems I was previously searching the wrong place; Python IfcOpenShell documentation. Thank you

  • edited December 2023

    @brunopostle I am trying to use git but currently have this error when I try to "Push working branch"; error
    Even though I have internet access. I also changed the repo to 'Public' when I thought the access to the initial 'Private' settings might be the cause but I got the same error over and over again. If you can kindly help. Thank you.

  • Have you set up SSH keys? Github doesn't allow password access to repositories

  • @Owura_qu assuming this github repository is empty, can you clone it into a local folder with blenderbim? This would establish that authentication and authorisation is working

  • edited December 2023

    Have you set up SSH keys? Github doesn't allow password access to repositories

    I got the error on the first attempt to "Push working branch" with the SSH keys I copied from GitHub.

  • edited December 2023

    @Owura_qu assuming this github repository is empty, can you clone it into a local folder with blenderbim? This would establish that authentication and authorisation is working

    I am trying to redo it again but now I can't find the Git buttons on the Git panel when I expand it. Anything to let the Git buttons reappear?

    Okay I have just restarted Blender and the panel is back.

  • If it still isn't working we need to test your git installation using the command-line, are you using Windows?

  • edited December 2023

    @Owura_qu assuming this github repository is empty, can you clone it into a local folder with blenderbim? This would establish that authentication and authorisation is working

    Can you clarify these;
    1. When you say GitHub repository should be "empty" what do you mean? This is my git repository with the saved .ifc project file in it;
    I watched your demonstration video on YouTube and I think I followed it very well and saw that your "empty" repository was D:\demo\model.ifc.
    2. I don't understand when you say clone with BlenderBIM.
    Thank you.

  • @brunopostle said:
    If it still isn't working we need to test your git installation using the command-line, are you using Windows?

    YES. I'm using windows

  • If I have a remote repository on github that doesn't contain any files (such as this one: https://github.com/brunopostle/empty), I can do two things:

    1. clone it to my local machine. ie. in BlenderBIM, Clone a remote repository, enter git@github.com:brunopostle/empty.git for Git URL and D:\empty\ for Local folder. This will put a version of the remote repository on my local disk and automatically configure a remote called origin. (I still need to create and add an IFC file to be able to do anything interesting with this repository)
    2. ..or I could Add remote to an existing local repository. ie. in BlenderBIM, set New remote name to origin and Git URL to git@github.com:brunopostle/empty.git. Then it should be possible to push the current branch to this remote repository.

    If you have GitHub ssh keys set up correctly, you should be able to do both these things (though you wouldn't be able to push to my repository without me giving you access).

  • If you have GitHub ssh keys set up correctly, you should be able to do both these things (though you wouldn't be able to push to my repository without me giving you access).

    This is my git repository for the project I am trying to set up.

    Kindly let me know if there's anything else I missed in setting up the SSH correctly so I can proceed with the other suggestions you have made.

  • So, if you start with a fresh blender session, and try to clone the repository using BlenderBIM with git@github.com:Owuraqu/2378_AppauOwusuYaw.git as the Git URL, does this create a local folder with a .git subfolder? If so then you have ssh keys configured correctly.

  • So, if you start with a fresh blender session, and try to clone the repository using BlenderBIM with git@github.com:Owuraqu/2378_AppauOwusuYaw.git as the Git URL, does this create a local folder with a .git subfolder? If so then you have ssh keys configured correctly.

    I tried what you said and now I am getting this error (no .git subfolder created);

  • This same command works for me, since your repository is publically readable.

    So this means that you don't have ssh keys set up. There is a short description for how to do this for github here: https://community.osarch.org/discussion/comment/16208/#Comment_16208

  • edited December 2023

    So this means that you don't have ssh keys set up. There is a short description for how to do this for github here: https://community.osarch.org/discussion/comment/16208/#Comment_16208

    I followed the description in the discussion you sent to set up the SSH keys and restarted my PC. Now when I clicked on the "Clone repository" button the Git URL I pasted disappeared from the text input box. When I verified from Blender's System Console the info read "Repository cloned" but when I checked the local folder there's no .git subfolder created in it (ie. E:\AkwaabaGit\helloEmpty).

    Now when I re-paste the Git URL and try to do it again the "Clone repository" button is deactivated and I cannot click it.

  • BlenderBIM will refuse to clone a repository into a folder that isn't empty, so it looks like this clone has worked - this is why the button is disabled. The .git subfolder would normally be a 'hidden' folder on Linux, I guess it is on Windows too (I have 'show hidden files' enabled).

    Hope this makes sense, you should try the push operation that you were trying earlier.

    Owura_qu
  • @brunopostle Everything is working now?. Your support and patience is remarkable. I cannot shake your hands for a BIG thank you but you get the idea of how grateful I’m. Finally achieving this milestone to manage BBIM backups means a lot to me and God bless you.

    Nigel
  • edited December 2023

    @brunopostle Every> @brunopostle said:

    This same command works for me, since your repository is publically readable.

    One more thing; Does Private repos work with IFCGit? Or I have to always keep them Public.

  • Great! glad you got it working. You can definitely use private online repositories

    Owura_qu
  • edited December 2023

    @brunopostle I am working on a file and I tried to "Push working branch" back to the GitHub repository and I got this error;

    These are the steps I took before experiencing the error;
    1. I opened my existing .ifc file in BBIM and created/ added a git repository.
    2. Then after saving I successfully "Push working branch" to a newly created GitHub repository.
    3. Now, in GitHub I added a README.md to the repository.
    4. I came back to BBIM and deleted an IfcGeographicElement, saved and committed it to the master (no branch was created).
    5. In BBIM I "Fetch from remote" to bring in the update from GitHub, but merging the BBIM master and the update I fetched from GitHub was not working.
    6. Now when I proceed to "Push working branch" back to the GitHub repository I get the error. Thanking you in advance.

  • I can't test from here but BlenderBIM should be able to cope with this extra file. You are correct that you need to fetch and merge before you can push to the remote.

    To resolve this you you may need to switch to the git gui or command-line and run git pull, this will perform the equivalent of fetch and merge for all files in the repository.

  • To resolve this you you may need to switch to the git gui or command-line and run git pull, this will perform the equivalent of fetch and merge for all files in the repository.

    This is what I get using the command line;

  • This definitely needs fixing in blenderbim, nothing is broken in your repository, this multiple file situation isn't handled very well.

    Depending on the name of your primary branch, one of these should work:

    git pull origin main
    
    git pull origin master
    
  • edited December 2023

    This is what I am getting after running the "git pull origin master";

    Since I am not able to merge the one I fetched (from GitHub) with the BBIM master could that also be the cause? Or it still possible to "Push working branch" without merging first?
    Below is the error I get when I try to merge the BBIM master with the GitHub first commit;

    And below is the other error I get when I try to merge the BBIM master with the GitHub README.md commit;

  • This is a new one, on this Windows computer Git finds your username and email from the system settings, but it looks like you need to set these manually on the command-line:

    git config --global user.email "uwura_qu@example.com"
    git config --global user.name "Owuraqu"
    

    Thanks, I know this is annoying to deal with these error messages, but you are finding corner-cases that blenderbim needs to be able to handle automatically.

  • edited December 2023

    @brunopostle said:
    This is a new one, on this Windows computer Git finds your username and email from the system settings, but it looks like you need to set these manually on the command-line:

    So, in this case which of my emails is being requested for from the systems settings? Or is it what I used to create my GitHub account?

    Thanks, I know this is annoying to deal with these error messages, but you are finding corner-cases that blenderbim needs to be able to handle automatically.

    It's okay sir, no pain no gain:). I know it's through this that it would become much better and stable. Thank you.
    I used one of my emails (it's what I used for GitHub and on my computer but kindly clarify this for me). Find results below;

    Now I can see the README.md created in GitHub appear in my local repository so kindly let me know the way forward now.

Sign In or Register to comment.