I need to copy a directory (/local_backups
) containing database backups from my CentOS server to an offsite SFTP server. But I am uncertain about something:
Should I run the command with a trailing slash after the source folder or not?
Should it be A or B?
A. sftp> put -r /local_backups
B. sftp> put -r /local_backups/
I have searched many forums and cannot find anything specific to sftp
commands.
It does not matter. In both cases, it behaves as if the path was ending with the slash:
sftp> put -r /local_backups
Uploading /local_backups/ to /
Entering /local_backups/
sftp> put -r /local_backups/
Uploading /local_backups/ to /
Entering /local_backups/