AllskyTeam / allsky

A Raspberry Pi operated Wireless Allsky Camera
MIT License
1.13k stars 177 forks source link

added rsync to list of upload protocols #3580

Closed MichelMoriniaux closed 3 months ago

MichelMoriniaux commented 3 months ago

was having a lot of issues with scp slowness to upload from my remote observatory to the other side of the world. rsync solved all my problems.

updated uploads.sh and the documentation

EricClaeys commented 3 months ago

@MichelMoriniaux, Michel, nice job, very complete. Would you be able to modify this PR (or create a new one) against the v2024.xx.xx branch? That's the release we're almost done with, so we're not making any more changes to the current release. It should be fairly easy.

In the new release we merged ftp-settings.sh and config.sh into config/settings.json, which means ALL settings (except Website ones) are now modified via the WebUI. We also added ~/env.json that contains all the private settings like passwords, etc. This is so a web page can't see them, and so people can send us their settings.json file without having to hide private data.

I suspect you'll be able to make the changes in about 30 minutes. Feel free to download the v2024.xx.xx branch and play around with it (but keep your current code). Note that v2024.xx.xx doesn't currently allow you to install a remote website and there are some other bugs, but I'm running it on a few machines.

Thanks - Eric

MichelMoriniaux commented 3 months ago

just made the changes but not able to test them, I added a few remarks in comments

On Sat, Apr 20, 2024 at 2:00 PM Eric Claeys @.***> wrote:

@MichelMoriniaux https://github.com/MichelMoriniaux, Michel, nice job, very complete. Would you be able to modify this PR (or create a new one) against the v2024.xx.xx branch? That's the release we're almost done with, so we're not making any more changes to the current release. It should be fairly easy.

In the new release we merged ftp-settings.sh and config.sh into config/settings.json, which means ALL settings (except Website ones) are now modified via the WebUI. We also added ~/env.json that contains all the private settings like passwords, etc. This is so a web page can't see them, and so people can send us their settings.json file without having to hide private data.

  • The config_repo/options.json.repo determines what settings appear in the WebUI, what their options are etc. You'll need to add "rsync" to it. Maybe put it after "scp" since they are somewhat related, but anywhere in the list is fine.
  • Your changes to config_repo/ftp-settings.sh.repo aren't needed.
  • The allskyWebsite.html changes will need minor modifications - you won't have any problems.
  • check_allsky.sh changes: these will need to go in check_remote_server() in scripts/installUpgradeFunctions.sh. You can probably just add "rsync" to the ftp | ftps | sftp | scp) line and add in the *) section.
  • functions.sh changes aren't needed.
  • upload.sh: I suggest adding "rsync" to the elif [[ "${PROTOCOL}" == "scp" ]] ; then line, then add an "if" after the existing "if" to perform the correct commands. I think "--port=PORT" is needed instead of "-p PORT" for the REMOTE_PORT. According to the rsync manual page "-p" is to preserver permissions.

I suspect you'll be able to make the changes in about 30 minutes. Feel free to download the v2024.xx.xx branch and play around with it (but keep your current code). Note that v2024.xx.xx doesn't currently allow you to install a remote website and there are some other bugs, but I'm running it on a few machines.

Thanks - Eric

— Reply to this email directly, view it on GitHub https://github.com/AllskyTeam/allsky/pull/3580#issuecomment-2067779870, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADBS7WQVR7TWQCZCVSTILBTY6LJPBAVCNFSM6AAAAABGQUXBKOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRXG43TSOBXGA . You are receiving this because you were mentioned.Message ID: @.***>