...results to be avoid unexpected consequences. Can I Test Things Locally With a Database Dump? Unfortunately not. Restoring from a logical database backup, i.e. an SQL dump, will not reproduce...

...the error and is not suitable for testing changes, since importing dumps will re-create indexes in the first place. How Do I Test All Indexes In All Databases?

The first number fs_freq When this field is set to 1 dump(8) will make a backup of the partition. Not using dump for backups? You can...

...are using JSON. To safely write and read YAML files you should use Psych#dump (String#to_yaml) and Psych.safe_load (YAML.safe_load): data = {'key' => 'value'}.to_yaml => "---\nkey: value...

...place. All of them are a side effect that you can not configure Psych#dump to only write safe data. Pitfall 1: Psych::DisallowedClass Psych#safe_load only whitelists the...

...say that you have something like that in your config/deploy.rb to create a database dump every time you deploy: before 'deploy', 'db:dump' This will not be called for cap...

...just use the deploy hook for important things. So instead of... before 'deploy', 'db:dump' after 'deploy', 'craken:install' after 'deploy', 'db:show_dump_usage' ...you say... before 'deploy:update...

makandra dev

When you have a hook in your Capistrano file that dumps your remote database, you might not want it to dump each time you deploy (say, you're experimenting with...

...staging and don't want ten dumps an hour). How to skip dump creation: Capistrano 2 In your Capistrano file: before 'deploy:update_code', 'db:dump' unless fetch(:skip_dump...

...but others won't need them – e.g. some notes, a log, or a database dump. Sure, you have a project directory – but all of it is tracked by Git. A...

...character set from messing with imports, use -r to export and SOURCE when importing. Dumping safely # Do not do this, since it might screw up encoding mysqldump -uroot -p database...

...you need to do mysqldump --default-character-set=latin1 (!) to get a correctly encoded dump. In that case you will also need to remove the SET NAMES='latin1' comment at...

makandra dev

Option 1: JSON dump In config/webpack/environment.js you can get inspect environment which includes all webpack config options set for the current environment: const { environment } = require('@rails/webpacker') const webpack = require('webpack...

github.com

Using this gem I could get JSON generation from a large, nested Ruby hash down from 200ms to 2ms.

Here is a hacky way to load dumps directly from the source server, without fully copying them over and extracting them first. It may break horribly for you. This is...

...t have it already: sudo apt-get install pv Know the location of the dump file on the remote server. We'll use /mnt/dumps/my_project.dump.bz2 in the example below.

makandra dev

...slaves you most likely want to skip the mysql database. Restart your MySQL server Dump the database for the slave You can skip the following and use LOAD DATA FROM...

+------------------+----------+--------------+------------------+ | File | Position | Binlog_Do_DB | Binlog_Ignore_DB | +------------------+----------+--------------+------------------+ | mysql-bin.000001 | 1219 | | | +------------------+----------+--------------+------------------+ Dump the database (in a new terminal): mysqldump -uroot -p -r the_dump.sql some_project_production

makandra dev
github.com

...install, create database.yml, create databases, migrate), optionally run all tests (--test) or load a dump (--dump staging) update: update a Rails project that has been lying around for some time...

...selenium: previously run_tests, runs a given command with Firefox for Selenium set up dump: combined dump handling, can create, download and source dumps See command help for details...

...remote$ sudo tcpdump host 147.0.0.123 and port 80 -s 0 -w /tmp/network.dump Copy the dump to your local machine: local$ scp $remote_host:/tmp/network.dump . Load the dump: local$ wireshark network.dump

makandra dev
semaphoreci.com

...like Ruby's system etc. methods. Just call them with separate arguments, e.g. execute :dumple, '--fail-gently'. Hooks have changed: deploy:update_code -> deploy:updating Invocation of other tasks has...

...need to wrap your task body in a on...

...do...

...end block, e.g. task :dump do on primary roles :db do # <-- this # perform dump end end undefined method `map' for...

...schema.rb into the test database. You may need to run a rake db:schema:dump before to get an updated schema.rb -- else you might load an outdated database structure.

...do a db:test:prepare. rake db:test:clone You don't need to dump your database schema explicitly when calling this rake task (it generates the schema.rb for you...

makandra dev

...database, with all its tables and their data, under a new name. Make a dump of your source database: mysqldump -uroot -p my_project -r my_project.sql Or, if you only...

...want to dump the database's table structure (schema) without any contents: mysqldump -uroot -p my_project -r my_project.sql --no-data Open up a MySQL shell: mysql -uroot -p

makandra dev
github.com

geordi delete_dumps [directory] Recursively search for files ending in *.dump and offer to delete those. When no argument is given, two default directories are searched for dump...

...files: the current working directory and ~/dumps (for dumps created with geordi). geordi drop_databases Delete local MySQL/MariaDB and Postgres databases that are not whitelisted. Authentication is handled via PAM...

makandra dev

...checks out a feature branch based on a story from Pivotal Tracker Faster MySQL dumping with --single-transaction and --quick Allow pivotal tracker ids in the global config file

...missing require for Fileutils in the dump load command (#145) Document PARALLEL_TEST_PROCESSORS

makandra dev
github.com

It gives you the power to get a dump from your production database with dump-for production install your local gems to the production machine with install-gems-remotely...

After loading a staging dump into development, you might get an ActiveRecord::EnvironmentMismatchError when trying to replace the database (like rails db:drop, rails db:schema:load). $ rails db:drop

...to do this in production environment, but on a development machine, follow these steps: Dump your databases, if you want to keep them. Keeping the data directory itself did not...

When you need to store structured data (like Ruby hashes) in a single database column with ActiveRecord, a simple way...

github.com

...data. See the README on how to add it as a middleware. It will dump its data to the tmp directory. Sampling is by default based on CPU time, so...

...gem also includes a command line utility to extract useful information from the raw dumps. You can run stackprof tmp/stackprof-cpu-* --limit 5 to see the 5 worst offenders. The output...

timetobleed.com

...in the Linux kernel which allows external programs to be launched when a core dump is about to happen. I provide a link to a short and ugly Ruby script...

...faulting process, runs gdb to get a backtrace (and other information), captures the core dump, and then generates a notification email...