Terminal Command For Move, Delete, Zip and Unzip, Download on VPS
terlebih dahulu instal unzip pada vps:
lalu Anda sudah bisa zip file dengan perintah:
Terminal Command For Move, Delete, Zip and Unzip, Download on VPS
cara backup database mysql command:
Terlebih dahulu instal dulu mysql dengan perintah: yum install mysql
Lalu Anda bisa backup database dengan Perintah di terminal:
$ mysqldump -u username -p databasename > backup.sql
Jika mysqldump diatas tidak bisa maka gunakan perintah dibawah ini:
/usr/local/apps/mysql/bin/mysqldump --opt -u username -p databasename > backup.sql
Anda bisa kirim file tersebut ke server lain dengan perintah
scp wp-content1.zip IP:/home/runcloud/webapps/websitekita/
rm : delete a file
rm filename.txt : deletes filename.txt, will more than likely ask if you really want to delete it
rm -f filename.txt : deletes filename.txt, will not ask for confirmation before deleting.
rm -rf tmp/ : recursively deletes the directory tmp, and all files in it, including subdirectories. hati-hati dalam menghapus file.
Restore database dengan perintah:
$ mysql -u username -p databasename < backup.sql
jika diminta password db, maka masukkan passwordnya lalu enter
Jika terjadi masalah saat upload plugin atau theme yang berpesan seperti ini:
Connection Information To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. webuzo
maka Anda buatlah akun ftp di endpanel webuzo dengan direktori sesuai dengan lokasi domain anda.
lalu masukkan host dengan nama domain dan user name serta password.
terlebih dahulu instal unzip pada vps:
yum
install
zip
lalu Anda sudah bisa zip file dengan perintah:
zip -r wp-content.zip wp-content
(jika Anda ingin mengkompress folder wp-content
cara backup database mysql command:
Terlebih dahulu instal dulu mysql dengan perintah: yum install mysql
Lalu Anda bisa backup database dengan Perintah di terminal:
$ mysqldump -u username -p databasename > backup.sql
Jika mysqldump diatas tidak bisa maka gunakan perintah dibawah ini:
/usr/local/apps/mysql/bin/mysqldump --opt -u username -p databasename > backup.sql
Anda bisa kirim file tersebut ke server lain dengan perintah
scp wp-content1.zip IP:/home/runcloud/webapps/websitekita/
- Log in to your server with SSH as root.
- Navigate to the directory where there are the files to be transferred, using cd command:
cd /path/to/the/directory/
- Type the following command (make sure you replace the IP address and the file name):
scp file.txt 10.10.10.10:/root/
In this example, 10.10.10.10 is the IP address of the destination server, and /root/ is the destination folder of file.txt.
- You will be prompted to enter the root password of the remote server.
To copy a folder and its contents to another server, please use the following procedure:
If you need to copy a folder and its contents, you should use the -r (recursive) option with the command like this:
scp -r foldername 10.10.10.10:/root/
For more information on how to use the scp command, please consult this link:
-----------
hapus file folder wp-content dengan perintah: rm -rf wp-contentrm : delete a file
rm filename.txt : deletes filename.txt, will more than likely ask if you really want to delete it
rm -f filename.txt : deletes filename.txt, will not ask for confirmation before deleting.
rm -rf tmp/ : recursively deletes the directory tmp, and all files in it, including subdirectories. hati-hati dalam menghapus file.
Restore database dengan perintah:
$ mysql -u username -p databasename < backup.sql
jika diminta password db, maka masukkan passwordnya lalu enter
Jika terjadi masalah saat upload plugin atau theme yang berpesan seperti ini:
Connection Information To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. webuzo
maka Anda buatlah akun ftp di endpanel webuzo dengan direktori sesuai dengan lokasi domain anda.
lalu masukkan host dengan nama domain dan user name serta password.
Move a file from one location to another using SSH mv command
mv /path/to/file /new/path/to/file
Move several files into a directory with SSH mv
mv -t directory fileToMove1 fileToMove2
Renaming a file with the mv command
Moving a file in the same directory with a different name will simply rename it
mv oldFileName newFileName
Komentar
Posting Komentar