feat: SFTP remote storage with key file auth + CLI restore options #94
Reference in New Issue
Block a user
Delete Branch "feat/sftp-keyfile"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
SFTP Remote Storage
New
sftpremote storage type using systemscp/sshbinaries with SSH key authentication.Key storage: Private key is pasted into a textarea in the profile form and stored as
MEDIUMTEXTin#__mokosuitebackup_profiles. At upload time, the key is written to a temp file with0600permissions, used for the SCP transfer, then deleted. No key files left on disk.Authentication: Supports key file (primary) or password fallback. Key passphrase field available but requires ssh-agent for encrypted keys.
Profile fields: host, port, username, password, key textarea, passphrase, remote path — all conditionally shown via
showon="remote_storage:sftp".CLI Restore Options
mokosuitebackup:restorenow supports:--files-only— restore files without touching database--db-only— restore database without touching files--no-preserve-config— overwrite configuration.php--password— decryption password for encrypted archivesIntegration
BackupEngine+SteppedBackupEngine—sftpincreateUploader()matchPreflightCheck— validates SFTP host, username, key/password01.35.00.sql— 7 new columnsTest Plan
mokosuitebackup:restore 1 --files-onlyrestores files onlymokosuitebackup:restore 1 --db-onlyrestores DB only