Transfer directories with rsync
Install rsync on the client and configure the cn-backup SSH alias. Windows users can run rsync inside WSL; configure the SSH key and alias inside that environment.
Preview, then uploadβ
rsync -rtvn --itemize-changes ./documents/ cn-backup:documents/
rsync -rtv --progress ./documents/ cn-backup:documents/
-n makes the first command a dry run. -r copies directories and -t keeps file modification times. The trailing slash on ./documents/ means βcopy this folder's contents.β
Remote paths are relative to your account's storage root: cn-backup:documents/ corresponds to /data/documents when browsing with SFTP. Do not prefix rsync destinations with /data.
Downloadβ
mkdir -p ./recovered-documents
rsync -rtv --progress cn-backup:documents/ ./recovered-documents/
Run the upload again later to transfer changed files. These examples do not remove remote files that disappeared locally. If you deliberately want a mirror, review a dry run with --delete before applying it: that option deletes destination files absent from the source.
Paths, links and metadataβ
Use ordinary files and directories for the first transfer. This account uses restricted rsync rooted in your storage and munges symbolic links. It is not a full operating-system filesystem replica: preserving device nodes, arbitrary owners or working remote symlinks is not the purpose of these commands. Use a Borg or restic archive when you need backup metadata and version history.
Automate a working commandβ
See Schedule jobs and manage usage. Test the command interactively first, then run it as the same user and with the same SSH configuration your scheduler will use.