omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    FTP sync

    Pythonista
    sync share ftp
    5
    16
    13340
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Gerzer
      Gerzer last edited by Gerzer

      It just takes awhile sometimes. :) I'm working on optimizing the custom FTP server directory walking mechanism, it is currently somewhat inefficient (many FTP servers don't implement a "walk"-type command even though one is defined in some versions of the protocol).

      1 Reply Last reply Reply Quote 0
      • Webmaster4o
        Webmaster4o last edited by

        My only other question is, how do I know when I'm pulling files from the server to my device and when I'm pushing files from my device to the server?

        1 Reply Last reply Reply Quote 0
        • Gerzer
          Gerzer last edited by Gerzer

          If the command is RETR, then the script is retrieving a file from the server. STOR means the script is storing a file on the server. Also, I was incorrect about the existence of a "walk"-type command in the FTP protocol, so I updated my previous post.

          1 Reply Last reply Reply Quote 0
          • Webmaster4o
            Webmaster4o last edited by Webmaster4o

            Ok. I'm working on a github-based alternative, because that will have built-in functionality to view older versions of code. I'm thinking something like a multi-device version of Time Machine on a Mac.

            1 Reply Last reply Reply Quote 0
            • Webmaster4o
              Webmaster4o last edited by

              @Gerzer My idea for an improvement to FTP sync is that you could compress all files first (as in @omz's pythonista-backup.py) before uploading to the FTP server. This would prevent having to upload files one by one, and also reduce file size on the server. Then the script could simply retrieve and decompress files on the other end.

              1 Reply Last reply Reply Quote 0
              • Gerzer
                Gerzer last edited by

                That sounds interesting. How much value is there for editing on the FTP server directly? If that is an important feature, then I could create a desktop app to access the files. Perhaps that's not necessary, however. What do you think?

                1 Reply Last reply Reply Quote 1
                • ccc
                  ccc last edited by ccc

                  It might be cool @Webmaster4o to also have a standalone script that walks the Pythonista directory structure creating a tarball (.gz, .zip, whatever) as it goes. This single file archive could then be transferred via FTP, Webdav, Dropbox, email, etc. I know that the Pythonista zipfile module has some upper limit on filesize.

                  It might also be cool to have a script that shows the 10 largest files in the Pythonista directory structure.

                  1 Reply Last reply Reply Quote 0
                  • Webmaster4o
                    Webmaster4o last edited by

                    @omz's pythonista backup script creates a zip file of the entire structure with shutil.make_archive. He stores this in a temp file (otherwise it grows in size forever and never finishes) and then moves it to the main directory. I'm actively working on an FTP sync that compresses first, I've just written a file browser with UI to browse the contents of a zip file without extracting first. The service will upload the entire zip, then allow the user to choose individually which files to extract from the archive. I'm also hoping to have a system by which multiple (5?) backups are kept on the server and you can choose from when you want to restore a file.

                    1 Reply Last reply Reply Quote 0
                    • MartinPacker
                      MartinPacker last edited by

                      I think the limit for a zip file is 2GB (though there might be a version that allows for more) @ccc.

                      1 Reply Last reply Reply Quote 0
                      • Webmaster4o
                        Webmaster4o last edited by

                        Compressing my entire library yeilds about 70MB… I don't think that in compressed form 2GB is realistic

                        1 Reply Last reply Reply Quote 0
                        • medufacaxperiae5
                          medufacaxperiae5 last edited by

                          This post is deleted!
                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post
                          Powered by NodeBB Forums | Contributors