Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: how to make full device backup over network (no USB) as a regular Linux user #1076

Open
avibrazil opened this issue Jun 18, 2024 · 12 comments

Comments

@avibrazil
Copy link

avibrazil commented Jun 18, 2024

Documentation doesn't explain this.

I'd like to have a home backup server for my iOS devices.

I can initialize things with a USB cable and root user, but subsequent connections and backups I'd like to make them as a regular user, wirelessly.

I also expect subsequent backups will be incremental.

How to setup this environment? Or would you please point me to instructions on how to do that ?

Thank you in advance

@doronz88
Copy link
Owner

Unfortunately, usbmuxd on linux doesn't support wifi connections.
However, if your device iOS > 17.0, you may do the backup over it instead which supports wifi.

@avibrazil
Copy link
Author

I’m 17.5

How to make backups over WiFi?
Documentation isn’t clear and I was only able to make it over cable.

@avibrazil
Copy link
Author

How to open the device for network connections, how to keep the device open, how to network connect and start backups?

@jordus100
Copy link

tunneld which is run with pymobiledevice3 remote tunneld command by default will try to connect (establish tunnels) to your iPhone over Wi-Fi when the device is unplugged from USB and in the same LAN. You just need to be connected via USB to pair for the first time.

@avibrazil
Copy link
Author

avibrazil commented Jun 19, 2024

I just need to leave pymobiledevice3 remote tunneld running and it will automatically connect to the device every time it is on same LAN? Even when the device leaves and comes back? Then how to start backups over the network? The backup2 command doesn’t accept the IP and port parameters, as far as I can check.

In the readme, only place that pymobiledevice3 remote tunneld is mentioned is referring Windows and that’s why I ignored it. Very confusing.

@doronz88
Copy link
Owner

Just add --tunnel UDID to any command to make it use the tunnel. You can also just add --tunnel '' and if there are multiple devices connected, it will prompt for which to connect to

@avibrazil
Copy link
Author

avibrazil commented Jun 20, 2024

$ pymobiledevice3 backup2 backup --full --tunnel ""
2024-06-20 07:17:41 hostname pymobiledevice3.__main__[834623] ERROR Device is not connected

This device was connected via USB cable before to this pymobiledevice installation on this computer and all trust requested was approved. Now this trial was wireless.

———

Can someone please provide all the sequence of steps required to make wireless incremental iOS backups to a Linux host with iOS>=17, including which Linux user must be used for each command (security and privilege concerns) for initial setup (with cable?) and then the everyday backups (wireless?) ?

I’m an advanced, experienced Linux and Python and iOS user, but still I can’t make it work because of poor and scattered documentation. If I can’t do it, I bet nobody except the original developers won’t be able to do it either with current documentation.

I can provide a patch (pull request) to readme with the full process and steps once I manage to make it work because I think this is important and more users need access to this functionality.

Thank you in advance

@doronz88
Copy link
Owner

Make sure you enabled the device for wifi connections:

pymobiledevice3 lockdown wifi-connections on

Afterwards, you should be able to see tunneld just creating a tunnel to the device as soon as it discovers it over bonjour

@avibrazil
Copy link
Author

avibrazil commented Jun 26, 2024

pymobiledevice3 lockdown wifi-connections on

Still doesn't work

Would you mind putting in one comment here the sequence of commands to pair with cable, disconnect cable and then do a full wireless backup on Linux, specifying which user has permission to execute command on each step ?

Everything works with cable connected. Once I disconnect, all stops working. I also revisited the readme, which still doesn't work for me.

Thank you in advance

@jordus100
Copy link

jordus100 commented Jul 3, 2024

Make sure you enabled the device for wifi connections:

pymobiledevice3 lockdown wifi-connections on

Afterwards, you should be able to see tunneld just creating a tunnel to the device as soon as it discovers it over bonjour

Lockdown wifi tunnels still go through usbmuxd and its Unix socket, don't they? I suspect they won't work on Linux because of lack of a proper wireless usbmuxd implementation.

However, if your device iOS > 17.0, you may do the backup over it instead which supports wifi.

AFAIK that first requires pairing and establishing a USB-over-Ethernet tunnel, so OP needs the custom Linux driver to do the first-time cable pairing.

@avibrazil
Copy link
Author

avibrazil commented Jul 3, 2024

I'm starting to suspect that wireless is currently impossible under Linux due to usbmuxd limitations.

And everything that people answered here about how to operate wirelessly was on other platforms, Windows, macOS etc.

Can anyone confirm this please?

@jordus100
Copy link

I've done wireless on Linux on a custom kernel version as described in the thread #566 and it certainly works. To not use the custom kernel patch I think you can use go-ios https://github.com/danielpaulus/go-ios , they seem to have created a userspace driver in golang.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants