![]() I don't want two sets of config and exclude files. For example, I use one server to run Django and a different one for Nginx. Which remote file/folder/s would you like to copy to your local folder? i.e 1 or Įnable the config file to have multiple servers. $ These are the file/folder/s that differ Potentially format the output so that it has a better hierarchy and is clearer.įrom here one could manually copy across the bits they want or possibly do it programmatically. run diff -r -N _orite_copy_/ -exclude-from /_orite_exclude.txt.Sync from the remote folder to the copy.So the suggested solution is to make an invisible copy of the local folder to _orite_copy_.rsync will tell you that files differ, but if you want to know exactly what the difference is, which lines, for example, you are out of luck.ĭiff is great with this kind of thing, but getting diff to run over a network is slow. Whilst we can run rsync with the dry run flag the feedback you get is unsatisfactory. ![]() How does this directory differ from the remote one? This will facilitate writing to config whilst running the app. Use the -r flag to override this.Ĭhange the settings.py file into a _orite_config.ini file. By default, orite will run in dry-run mode. Will initialise two configuration files orite -^ Run the following command preferably above the folder you are looking to copy. You will also need to download the _orite_exclude.txt and put it in the same location as orite.py. alias orite='python3 path-to-orite-folder/orite.py' In the meantime download the orite.py file and add an alias to your bash profile. It's pronounced like this rather than ‘oh-right’. This project is an effort to centralise a sync approach, add options, future functionality, and do it using Python. I ended up with variations of this script in each folder I made. I moved on from that to running a straight shell script. Whilst it was accurate it was a little clunky and again not super fast. ![]() Running the fabfile would commit, push, login to the remote server and then pull and restart. I used to do this thing using Git and a Python library called fabric. Meaning one can copy the entire repo into the wrong folder or just loose amongst your other stuff. I also find it hard to remember to include a slash on the local and exclude a slash on the remote path. ![]() There are a lot of flags to remember, as well as the username, IP address, the remote path, and the exclude file path. The problem is that there is a lot to type in. The CLI tool rsync is brilliant for this purpose in that it is lightning quick. The purpose of orite is to synchronise folders and files between a remote and local server.įTP apps like Transmit and Cyberduck can synchronise content, but they are slow. Orite An opinionated rsync wrapper written in Python ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |