Home > Database > Mysql Tutorial > Linux下使用crontab调用shell中的scp自动备份mysql数据

Linux下使用crontab调用shell中的scp自动备份mysql数据

WBOY
Release: 2016-06-07 16:51:05
Original
959 people have browsed it

一、为了在Linux下使用scp的时候不需要输入密码,采用ssh另一种用密钥对来验证的方式 。1、使用ssh-keygen 命令生成密钥。生成过

一、为了在Linux下使用scp的时候不需要输入密码,采用ssh另一种用密钥对来验证的方式 。

1、使用ssh-keygen 命令生成密钥。生成过程中,除了输入密码外,其他都选择默认的值:回车即可。

[root@xxx root]# ssh-keygen -t rsa

Generating public/private rsa key pair.

Enter file in which to save the key (/root/.ssh/id_rsa):

Created directory '/root/.ssh'.

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in /root/.ssh/id_rsa.

Your public key has been saved in /root/.ssh/id_rsa.pub.

The key fingerprint is:

e0:f0:3b:d3:0a:3d:da:42:01:6a:61:2f:6c:a0:c6:e7 root@xxx

[root@xxx root]#

linux

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template