Git Product home page Git Product logo

synccraft's Introduction

syncCraft

SyncCraft is a command-line shell script for sites powered by Craft that makes it simple to sync your database and assets to your local machine from a remote server. This is geeky and could go wrong if you aren't familiar with shell scripts. Please use with extreme caution.

What does it do?

SyncCraft downloads your remote database, deletes your local database, and imports the remote database into your local database. It then syncs down any new/unchanged assets from the folders you provide. It does this all via ssh, mysqldump, and rsync.

Notes

  • This is in alpha
  • Newer versions will probably rely on my.cnf files to set MySQL authentication, rather than setting them as variables in syncCraft.cfg, but I'm open to suggestsions
  • This is in alpha. BEWARE.

Instructions - alias

The easiest way to run the installer is to copy syncCraft.cfg into each site directory, and for each: fill in the variables, and then copy the following line and run it from your terminal from that directory.

bash <(curl -s https://raw.githubusercontent.com/mattstauffer/syncCraft/master/syncCraft.sh)

You could even add that line as an "alias" to your shell. Edit your ~/.bash_profile (or ~/.zshrc if you use Zsh) and add this line at the bottom to make this a powerful and simple shortcut:

alias syncCraft="bash <(curl -s https://raw.githubusercontent.com/mattstauffer/syncCraft/master/syncCraft.sh)"

Now close ~/.bash_profile and restart your terminal window. You can now run this command from any of your site directories just by running the command syncCraft. That's it!

Instructions - local copy

  1. Download syncCraft.sh and place it somewhere you can access it easily from your Terminal. Consider your home folder (~/)
  2. Make sure your permissions are set so it's executable: chmod +x ~/syncCraft.sh
  3. Copy syncCraft.cfg into your site directory and fill in the variables
  4. Run syncCraft from that directory: ~/syncCraft.sh every time you want to sync it
  5. That's it!

GIF

Animation showing syncCraft running

synccraft's People

Contributors

mattstauffer avatar bwlng avatar rungta avatar souvikdg avatar

Stargazers

Peter Tell avatar sio.eth avatar  avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.