Last active
March 23, 2020 10:12
-
-
Save darshitvvora/cfc45d56bf3b63dfc331b74f58e64fb7 to your computer and use it in GitHub Desktop.
Useful Server Operations and Maintainence Command
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Tarzip and compress a folder in linux | |
| tar -zcvf filename.tar.gz /mnt/volume-nyc1-03/foldername | |
| # Check disk space | |
| df -h | |
| # Check current folder path | |
| pwd | |
| # Detach volume (Linode/DigitalOcean) remove text from fstab file | |
| sudo nano /etc/fstab | |
| # Run long running command in background | |
| yum install screen | |
| screen | |
| # run your command and press Ctrl + ad and screen -ls listing all screens | |
| # Reattach screen | |
| screen -r 20449.pts-0.db | |
| # take mysql dump of all DB | |
| mysqldump -u root -p --all-databases | gzip -c -7 > "/mnt/volume_nyc1_06/backup/16-03-2020.sql.gz" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment