Appearance
Dump and import notification logs from production
In order to test notification module, it's sometimes essential to copy the notification logs.
We don't dump the logs in backup scripts since it contains a lot of records and can cause the import time to increase drastically.
First, you need to ssh into production server:
bash
ssh forge@interaction-design.orgTo create a new gz archive with the notification logs, run the following commands:
bash
DUMP_UNCOMPRESSED_FILE_NAME=~/interaction-design.org/current/storage/app/notification-log.sql
mysqldump --single-transaction \
--default-character-set=utf8mb4 \
--no-create-info \
-u forge forge notification__notification_log -v >> ${DUMP_UNCOMPRESSED_FILE_NAME}
gzip -f ${DUMP_UNCOMPRESSED_FILE_NAME}Exit the bash and use scp to copy the generated file to your system:
Note: make sure you run these scripts from the root of the project.
bash
scp forge@interaction-design.org:~/interaction-design.org/current/storage/app/notification-log.sql.gz /tmp/notification-log.sql.gz
gunzip --force --keep /tmp/notification-log.sql.gz
mysql --host=127.0.0.1 --port=33060 --user=ixdf_web --password=secret ixdf --default-character-set utf8mb4 --binary-mode < /tmp/notification-log.sql