Skip to content

Instantly share code, notes, and snippets.

@leobossmann
Created July 15, 2013 08:41
Show Gist options
  • Save leobossmann/5998424 to your computer and use it in GitHub Desktop.
Save leobossmann/5998424 to your computer and use it in GitHub Desktop.
Dump rails database to a remote location, strip schema migrations
mysqldump --skip-triggers --compact --no-create-info --complete-insert -u [db_user] -p [db_name] | sed '/schema_migrations/d' | gzip -c | ssh [remote_user]@[remote_host] 'cat > [remote_file].sql.gz'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment