Skip to content

Instantly share code, notes, and snippets.

@zspine
Last active August 1, 2018 13:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zspine/427981ac7b756331a61a to your computer and use it in GitHub Desktop.
Save zspine/427981ac7b756331a61a to your computer and use it in GitHub Desktop.
#restart
sudo reboot
#shutdown
sudo poweroff
#copy from local to remote server
#scp target file user@ip-address destination
scp /home/migration/backup/example.txt root@1.1.1.1:/var/www/vhosts/example.com/backup
#extract tar.gz
tar -xvzf example.tar.gz
#extract .gz
gunzip -k example.gz
#apache version check
/usr/sbin/apache2 -v
#apache restart
sudo service apache2 restart
#restart mysql in case of failure
#sudo reboot
sudo service mysql stop
sudo service mysql start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment