Skip to content

Instantly share code, notes, and snippets.

View seangreen's full-sized avatar

Sean Grünböck seangreen

View GitHub Profile
@seangreen
seangreen / sg-imagersync.sh
Created June 30, 2015 09:15
Shell Script to RSync Image Folder (joomla or so)
#!/bin/bash
# Variables
# LIVE PATH (relative to current path
LIVE_PATH=../htdocs
# USAGE
function usage()
{
@seangreen
seangreen / mage-media-rsynclive.sh
Created June 29, 2015 10:18
Shell Script to RSync media folder from LIVE Install to DEV install + to create a maintenance.flag while doing so
#!/bin/bash
# Variables
# LIVE PATH (relative to current path
LIVE_PATH = ../public_html
# USAGE
function usage()
{
@seangreen
seangreen / mage-braintree-switch.sh
Created June 10, 2015 13:53
Shell Script to switch the Magento braintree gateway from Sandbox mode to Production mode and vice-versa
#!/bin/bash
# Author: Sean Grünböck / studio19.at
# Version: 1.0
# Usage: Use this script to switch braintree to sandbox or production mode
# VARIABLES
CONFIG_FILE="./app/etc/local.xml"
PAYMENT_PROVIDER="Braintree"
@seangreen
seangreen / mage-dbdump-sales-users
Last active December 28, 2018 19:21
Shell Script to Dump / Import Magento Sales and Customers
#!/bin/bash
# VARIABLES
CONFIG_FILE="./app/etc/local.xml"
DUMP_FILE="./var/db-sales-users.sql"
TABLES="sales_bestsellers_aggregated_daily sales_bestsellers_aggregated_monthly sales_bestsellers_aggregated_yearly sales_billing_agreement sales_billing_agreement_order sales_flat_creditmemo sales_flat_creditmemo_comment sales_flat_creditmemo_grid sales_flat_creditmemo_item sales_flat_invoice sales_flat_invoice_comment sales_flat_invoice_grid sales_flat_invoice_item sales_flat_order sales_flat_order_address sales_flat_order_grid sales_flat_order_item sales_flat_order_payment sales_flat_order_status_history sales_flat_quote sales_flat_quote_address_item sales_flat_quote_item sales_flat_quote_item_option sales_flat_quote_payment sales_flat_quote_shipping_rate
sales_flat_shipment sales_flat_shipment_comment sales_flat_shipment_grid sales_flat_shipment_item sales_flat_shipment_track sales_invoiced_aggregated sales_invoiced_aggregated_order sales_order_aggregated_created sales_order_aggregated_updated sales_order_statu
@seangreen
seangreen / mage-cache.sh
Last active August 29, 2015 14:22
Shell Script to Enable, Disable and/or Clean the Magento Cache
#!/bin/bash
# VARIABLES
CONFIG_FILE="./app/etc/local.xml"
# USAGE
function usage()
{
cat <<EOF
Usage: $0 [OPTIONS]
@seangreen
seangreen / mage-dbimport-live.sh
Last active August 29, 2015 14:22
Shell Script to import Magento LIVE DB to DEV DB
#!/bin/bash
# Author: Sean Grünböck / studio19.at
# Version: 1.1
# Date: 26.06.2015
# Usage: This script is used to import a LIVE Magento DB to a STAGING or DEV Environment. The script should be located in the Magento Home directory, that you want to import the DB into.
# Dependencies: This script needs mage-dbdump.sh by sonassi for DB dumping - has to be located in both Magento Installs (LIVE + CURRENT)
# (https://www.sonassi.com/knowledge-base/quicker-dumping-of-a-magento-mysql-database-for-branching/)