diff --git a/src/storage/filesystem.js b/src/storage/filesystem.js index 04813112a..9c820732c 100644 --- a/src/storage/filesystem.js +++ b/src/storage/filesystem.js @@ -171,7 +171,7 @@ async function copy(apiConfig, oldFilePath, newFilePath, progressCallback) { cpOptions += apiConfig.noHardlinks ? '' : 'l'; // this will hardlink backups saving space if (apiConfig.provider === PROVIDER_SSHFS) { - const identityFilePath = `/home/yellowtent/platformdata/sshfs/id_rsa_${apiConfig.mountOptions.host}`; + const identityFilePath = path.join(paths.SSHFS_KEYS_DIR, `id_rsa_${apiConfig.mountOptions.host}`); const sshOptions = [ '-o', '"StrictHostKeyChecking no"', '-i', identityFilePath, '-p', apiConfig.mountOptions.port, `${apiConfig.mountOptions.user}@${apiConfig.mountOptions.host}` ]; const sshArgs = sshOptions.concat([ 'cp', cpOptions, oldFilePath.replace('/mnt/cloudronbackup/', ''), newFilePath.replace('/mnt/cloudronbackup/', '') ]);