Skip to main content

Posts

Showing posts from May, 2015

[mysql] backup functions

mysqldump - h ... - u ... - p ... - n - d - t --routines --triggers --all-databases > MySQLStoredProc.sql - n , --no-create-db Suppress the CREATE DATABASE ... IF EXISTS statement that normally is output for each dumped database if --all-databases or --databases is given. - d , --no-data No row information. --triggers Dump triggers for each dumped table. ( Defaults to on ; use --skip-triggers to disable.) - R , --routines Dump stored routines (functions and procedures).

[fab] deploy script

@hosts('123.123.123.123') def staging():     """Deploy to staging"""     env.user = 'root'     env.remote_path = '/var/www/domain'     local('git push ssh://%(user)s@%(host_string)s/%(remote_path)s master' % env)     with cd('%(remote_path)s/' % env):         run('git reset --hard')         run('./symfony doctrine:build --all-classes --no-confirmation --quiet --env=staging')         run('./symfony doctrine:migrate --env=staging')         run('lessc /var/www/domain/css/style.less /var/www/domain/css/style.css')         run('./symfony cc --quiet --env=staging') @hosts('123.123.123.124') def web():     """Pull, build classes, symlink assets on web"""     with cd('%(remote_path)s/' % env):     ...