House of Marie logo

Migratie

1. Download kopie oude site.

# Deploy latest version of codebase
houseofmarie-production-deploy

# Move old data to new server
ssh hurah@houseofmarie.nl
mysqldump -uhouseofmar_ie -p houseofmar_marie > houseofmarie-$(date +%y%m%d).sql
exit
rsync -azP hurah@houseofmarie.nl:~/houseofmarie-$(date +%y%m%d).sql .
rsync -azP ./houseofmarie-$(date +%y%m%d).sql hurah@srv4.houseofmarie.nl:~/houseofmarie-$(date +%y%m%d).sql
rm ./houseofmarie-$(date +%y%m%d).sql

# Import old data into new database server in separate database
ssh hurah@srv4.houseofmarie.nl
mysql -u root -p houseofmarie_old < ./houseofmarie-$(date +%y%m%d).sql

# Just to be sure, log back in so we are on the right server
exit
ssh hurah@srv4.houseofmarie.nl

# Change user to houseofmarie
sudo su houseofmarie
cd /home/houseofmarie/system/public_html/houseofmarie.nl/console
# Allow command to run even when i close the terminal
screen
# Run migration command and log all the output
php application.php migrator:work | tee ~/migrator-work-log-$(date +%y%m%d).log
# Delete all previous migration scripts
mysql -uroot -p
DELETE FROM migration_scripts;
exit
exit
# Rerun all migration scripts 
houseofmarie-production-deploy