You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Sync media filesdesc'Sync all media files'task:mediadosystem"rsync -avz ./src/uploads #{fetch(:user)}@#{fetch(:host)}:#{shared_path}/"end# Pull media filesdesc'Pull all media files'task:mediapulldosystem"rsync -avz #{fetch(:user)}@#{fetch(:host)}:#{shared_path}/uploads ./src/"end# Push local DB to remotedesc'Push local DB to remote'task:pushdoset:confirmed,proc{puts<<-WARN======================================================================== WARNING: You're about to overwrite the remote database !======================================================================== WARNask:answer,"Are you sure you want to continue? y/N"iffetch(:answer)== 'y'thensystem"mysqldump --no-create-db --add-drop-database -u #{fetch(:database)[fetch(:stage)][:local][:user]}#{fetch(:database)[fetch(:stage)][:local][:name]} > dump.#{fetch(:stage)}.#{time}.sql"system"scp dump.#{fetch(:stage)}.#{time}.sql #{fetch(:user)}@#{fetch(:host)}:#{fetch(:home)}/dump/#{fetch(:application)}/local/"onroles(:web)doexecute"mysql -u #{fetch(:database)[fetch(:stage)][:remote][:user]} --password=#{fetch(:database)[fetch(:stage)][:remote][:password]}#{fetch(:database)[fetch(:stage)][:remote][:name]} < #{fetch(:home)}/dump/#{fetch(:application)}/local/dump.#{fetch(:stage)}.#{time}.sql"endsystem"rm dump.#{fetch(:stage)}.#{time}.sql"elseputs"\nCancelled!"exitend}.callend# Pull remote DB to localdesc'Pull remote DB to local'task:pulldoset:confirmed,proc{puts<<-WARN======================================================================== WARNING: You're about to overwrite the local database !======================================================================== WARNask:answer,"Are you sure you want to continue? y/N"iffetch(:answer)== 'y'thenonroles(:web)doexecute"mysqldump --no-create-db --add-drop-database -u #{fetch(:database)[fetch(:stage)][:remote][:user]} --password=#{fetch(:database)[fetch(:stage)][:remote][:password]}#{fetch(:database)[fetch(:stage)][:remote][:name]} > #{fetch(:home)}/dump/#{fetch(:application)}/remote/dump.#{fetch(:stage)}.#{time}.sql"endsystem"scp #{fetch(:user)}@#{fetch(:host)}:#{fetch(:home)}/dump/#{fetch(:application)}/remote/dump.#{fetch(:stage)}.#{time}.sql ./"system"mysql -u #{fetch(:database)[fetch(:stage)][:local][:user]}#{fetch(:database)[fetch(:stage)][:local][:name]} < dump.#{fetch(:stage)}.#{time}.sql"system"rm dump.#{fetch(:stage)}.#{time}.sql"elseputs"\nCancelled!"exitend}.callend
We don't necessary the direct load of the downloaded db but getting a staging dump could help.
The text was updated successfully, but these errors were encountered:
💬 Is your feature request related to a problem? Please describe.
Add capistrano tasks to download WordPress medias and download a database dump.
We already have some of them in capdrupal:
https://github.com/antistatique/capdrupal/blob/41db72b62680d74ce524c6cf6f9e5a3feecf173b/lib/capdrupal.rb#L263-L275
@Yago found (very) old capistrano tasks:
We don't necessary the direct load of the downloaded db but getting a staging dump could help.
The text was updated successfully, but these errors were encountered: