我正在将一个网站从远程服务器复制到另一个服务器,并且我有
SOURCE SERVER
/var/www/vhosts/namesiteA.com
/FolderA
/FolderB
DESTINATION SERVER
/var/www/vhosts/namesiteB.com
运行以下 bash 后:
#!/bin/bash
SOURCE="[email protected]:/var/www/vhosts/namesiteA.com/"
DESTINATION="/var/www/vhosts/namesiteB.com/"
sshpass -p "<source_server_pass>" scp -p -r "$SOURCE" "$DESTINATION"
工作正常,但我期望:
DESTINATION SERVER
/var/www/vhosts/namesiteB.com
/FolderA
/FolderB
instead I get:
/var/www/vhosts/namesiteB.com
/namesiteA.com
/FolderA
/FolderB