Selected from Linux Selected from PHP
- Ubuntu 17.10 Install google's mod pagespeed for apache - PHP-Ubuntu-Youtube-dl simple script for converting and downloading youtube video or mp3
- Ubuntu SSH tunnel via proxy - PHP while loop with every row with a different color
- Install GoAccess Apache Log Analyzer Tool on Ubuntu 17.10 - PHP use while loop in function
- SSHFS and map folder with a proxy - PHP List Files And Folders As links
- How to connect to SSH server with a proxy - PHP Extract Text From String
➥ .tar.gz /var/www and vardump mysql database and ssh to another server
Added by sonik on 08-05-2017 and keywords: simple, tutorial, how, to, tar, gz, mysqldump, ssh, linux, remote, server [ Print Article ]
First things first. With this small and simple tar command we archive all our /var/www/ data.

tar -zcvf archive.tar.gz /var/www


Now we dump the MySQL database with the next command.

mysqldump -u root -p databasename > /root/backupname.sql


You will be asked to write the password for the database user (in this case root).

scp archive.tar.gz root@destinationserver:/root
scp /root/backupname.sql root@destinationserver:/root


Again you will be asked twice for the password of the remote server but all your sensitive data will be saved there.
Again this is a very simple and just a small demonstration of what you can do with linux and ssh.

For questions please use our forums.
Article writhed by Liudmil Iliev (sonik_blast)
All rights reserved www.webleit.info

@All rights reserved with Copyright Webleit.info 2018 by Sonik_Blast [ Site Map ] [ RSS ] [ YouTube Mp3 Downloader and converter ]