cyberfly
9/8/2018 - 3:50 AM

Command for migrating server

cd /srv/users/serverpilot/apps/behealthy/public
mysqldump -u behealthy -p behealthy > behealthy.sql
zip -r behealthy.zip

cd /srv/users/serverpilot/apps/ezsecurestorage/public
mysqldump -u ezsecurestorage -p ezsecurestorage > ezsecurestorage.sql
zip -r ezsecurestorage.zip

cd /srv/users/serverpilot/apps/freshoren/public
mysqldump -u freshoren -p freshoren > freshoren.sql
zip -r freshoren.zip


cd /srv/users/serverpilot/apps/homestayutp/public
mysqldump -u homestayutp -p homestayutp > homestayutp.sql
zip -r homestayutp.zip


cd /srv/users/serverpilot/apps/integrasolid/public
mysqldump -u integrasolid -p integrasolid > integrasolid.sql
zip -r integrasolid.zip


cd /srv/users/serverpilot/apps/integrastore/public
mysqldump -u integrastore -p integrastore > integrastore.sql
zip -r integrastore.zip


cd /srv/users/serverpilot/apps/ionicbackend/public
mysqldump -u ionicbackend -p ionicbackend > ionicbackend.sql
zip -r ionicbackend.zip


cd /srv/users/serverpilot/apps/jinventory/public
mysqldump -u jinventory -p jinventory > jinventory.sql
zip -r jinventory.zip


cd /srv/users/serverpilot/apps/jkrarms/public
mysqldump -u jkrarms -p jkrarms > jkrarms.sql
zip -r jkrarms.zip


cd /srv/users/serverpilot/apps/jomphp/public
mysqldump -u jomphp -p jomphp > jomphp.sql
zip -r jomphp.zip


cd /srv/users/serverpilot/apps/jomwebtv/public
mysqldump -u jomwebtv -p jomwebtv > jomwebtv.sql
zip -r jomwebtv.zip


cd /srv/users/serverpilot/apps/juslega/public
mysqldump -u juslega -p juslega > juslega.sql
zip -r juslega.zip


cd /srv/users/serverpilot/apps/kerismalela/public
mysqldump -u kerismalela -p kerismalela > kerismalela.sql
zip -r kerismalela.zip


cd /srv/users/serverpilot/apps/misi-demo/public
mysqldump -u misi -p misi > misi.sql-demo
zip -r misi.zip


cd /srv/users/serverpilot/apps/nazaworld/public
mysqldump -u nazaworld -p nazaworld > nazaworld.sql
zip -r nazaworld.zip


cd /srv/users/serverpilot/apps/tanahairku/public
mysqldump -u tanahairku -p tanahairku > tanahairku.sql
zip -r tanahairku.zip


cd /srv/users/serverpilot/apps/tinysupportdemo/public
mysqldump -u tinysupportdemo -p tinysupportdemo > tinysupportdemo.sql
zip -r tinysupportdemo.zip


cd /srv/users/serverpilot/apps/uabutik/public
mysqldump -u uabutik -p uabutik > uabutik.sql
zip -r uabutik.zip


cd /srv/users/serverpilot/apps/wprestapi/public
mysqldump -u wprestapi -p wprestapi > wprestapi.sql
zip -r wprestapi.zip


cd /srv/users/serverpilot/apps/zubaidahabubakar/public
mysqldump -u zubaidahabubakar -p zubaidahabubakar > zubaidahabubakar.sql
zip -r zubaidahabubakar.zip

// dump db to current folder
// mysqldump -u username -p database_name > database_name.sql
mysqldump -u jomphp -p jomphp > jomphp.sql


// zip all content in current folder recursively including latest db dump
zip -r jomphp.zip .
zip -r behealthy.zip
zip -r integrasolid.zip
zip -r jkrarms.zip
zip -r kerismalela.zip
zip -r nazaworld.zip
zip -r wprestapi.zip
zip -r ezsecurestorage.zip
zip -r integrastore.zip
zip -r laragen.zip
zip -r tanahairku.zip
zip -r zubaidahabubakar.zip
zip -r freshoren.zip
zip -r ionicbackend.zip
zip -r jomwebtv.zip
zip -r misi-demo.zip
zip -r tinysupportdemo.zip
zip -r homestayutp.zip
zip -r jinventory.zip
zip -r juslega.zip
zip -r uabutik.zip

// local server pull zip file from remote server 

scp serverpilot@139.162.16.189:/srv/users/serverpilot/apps/jomphp/public/jomphp.zip /home/runcloud/webapps/jomphp/jomphp.zip

// local server unzip into current folder
cd /home/runcloud/webapps/jomphp
unzip jomphp.zip

// local server import DB

// import DB
// mysql -u username -p database_name < file.sql
mysql -u jomphp -p jomphp < jomphp.sql