rsync -- command-line for syncing from local to remote over ssh

lawlist

I'm looking for some assistance please to create a proper command-line for syncing from a local machine to a remote server over ssh.

Here is a draft that is not working.

/usr/bin/rsync --dry-run --delete -arzh /Users/HOME/.0.data/ "--rsh=/Users/HOME/.0.data/.0.emacs/elpa/bin/sshpass -p 'alpine' ssh -p '2222' -l root localhost" -t "cd /var/mobile/Applications/F30B1574-5979-4764-8742-7F9DB2863094/Documents/.0.data && bash --login"

The following command-line successfully logs in to my iphone over ssh via usb. Id like to incorporate that working command-line into something that can be used with rsync, but I need some assistance in that regard.

/Users/HOME/.0.data/.0.emacs/elpa/bin/sshpass -p 'alpine' ssh -p '2222' -l root localhost -t "cd /var/mobile/Applications/F30B1574-5979-4764-8742-7F9DB2863094/Documents/.0.data && bash --login"

For anyone who is interested in leaning how to ssh into an iphone over usb, here is a link that discusses the method: http://iphonedevwiki.net/index.php/SSH_Over_USB

lawlist

rsync must be installed on both locations. Cydia has an rsync binary that installs on the iPhone. The method of connection with rsync is the same as any regular ssh sever.


Here is a bash script solution (includes --dry-run):

#!/bin/bash

HOST="localhost";
PORT="2222";
USER="root";
PWD="alpine";
SOURCE="/Users/HOME/Desktop/test/";
TARGET="/private/var/mobile/Applications/F30B1574-5979-4764-8742-7F9DB2863094/Documents/test";
SSHPASS="/Users/HOME/.0.data/.0.emacs/elpa/bin/sshpass";
RSYNC="/Users/HOME/.0.data/.0.emacs/elpa/bin/rsync";

$RSYNC --dry-run --progress --delete -arvzh --rsh="$SSHPASS -p $PWD ssh -p $PORT -l $USER" $SOURCE $HOST:$TARGET

For an example of how to use rsync in conjunction with Emacs, see the following thread: https://emacs.stackexchange.com/a/5844/2287

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

"rsync" from remote to local

From Dev

"rsync" from remote to local

From Dev

Copying multiple files from remote using rsync over ssh

From Dev

Copying multiple files from remote using rsync over ssh

From Dev

rsync remote files over SSH to my local machine, using sudo privileges on local side, and my personal SSH key

From Dev

SSH into remote machine, run find command, then rsync the results of the find back to the local machine?

From Java

Run local X11 command from remote SSH connection

From Dev

Docker, how to remote ssh from command line host to a docker container?

From Dev

Can't ssh to remote repository from command line

From Dev

Set desktop background from command line over ssh

From Dev

How can I blank the screen from the command line over SSH?

From Dev

How can I blank the screen from the command line over SSH?

From Dev

Set desktop background from command line over ssh

From Dev

Append a local file to a remote file over ssh

From Dev

rsync from Linux to Windows over SSH

From Dev

rsync all files of remote machine over SSH without root user?

From Dev

bypassing .bashrc while rsync-ing a remote directory over ssh

From Dev

Rsync over SSH, who does the remote machine think I am

From Dev

rsync with remote sudo fails over ssh on Ubuntu Mate 18.04.2

From Java

How to execute a remote command over ssh with arguments?

From Dev

execute remote command over ssh strange behaviour

From Dev

rsync ssh to ssh to local

From Dev

ssh tunnel for local (not remote) command execution

From Dev

Query: rsync - Copying Local folder to Remote Server from Remote Server

From Dev

How to copy file contents to the local clipboard from a file in a remote machine over ssh

From Dev

Rsync Remote To Local Issue

From Dev

send X11 window from local PC, with VNC over SSH to remote PC, without touching remote PC

From Dev

How to redirect command output from remote machine to local file via ssh?

From Dev

How to redirect command output from remote machine to local file via ssh?

Related Related

  1. 1

    "rsync" from remote to local

  2. 2

    "rsync" from remote to local

  3. 3

    Copying multiple files from remote using rsync over ssh

  4. 4

    Copying multiple files from remote using rsync over ssh

  5. 5

    rsync remote files over SSH to my local machine, using sudo privileges on local side, and my personal SSH key

  6. 6

    SSH into remote machine, run find command, then rsync the results of the find back to the local machine?

  7. 7

    Run local X11 command from remote SSH connection

  8. 8

    Docker, how to remote ssh from command line host to a docker container?

  9. 9

    Can't ssh to remote repository from command line

  10. 10

    Set desktop background from command line over ssh

  11. 11

    How can I blank the screen from the command line over SSH?

  12. 12

    How can I blank the screen from the command line over SSH?

  13. 13

    Set desktop background from command line over ssh

  14. 14

    Append a local file to a remote file over ssh

  15. 15

    rsync from Linux to Windows over SSH

  16. 16

    rsync all files of remote machine over SSH without root user?

  17. 17

    bypassing .bashrc while rsync-ing a remote directory over ssh

  18. 18

    Rsync over SSH, who does the remote machine think I am

  19. 19

    rsync with remote sudo fails over ssh on Ubuntu Mate 18.04.2

  20. 20

    How to execute a remote command over ssh with arguments?

  21. 21

    execute remote command over ssh strange behaviour

  22. 22

    rsync ssh to ssh to local

  23. 23

    ssh tunnel for local (not remote) command execution

  24. 24

    Query: rsync - Copying Local folder to Remote Server from Remote Server

  25. 25

    How to copy file contents to the local clipboard from a file in a remote machine over ssh

  26. 26

    Rsync Remote To Local Issue

  27. 27

    send X11 window from local PC, with VNC over SSH to remote PC, without touching remote PC

  28. 28

    How to redirect command output from remote machine to local file via ssh?

  29. 29

    How to redirect command output from remote machine to local file via ssh?

HotTag

Archive