News, tips, advice, support for Windows, Office, PCs & more. Tech help. No bull. We're community supported by donations from our Plus Members, and proud of it
Home icon Home icon Home icon Email icon RSS icon
  • Working with OneDrive

    Posted on CWBillow Comment on the AskWoody Lounge

    Home Forums AskWoody support Windows Windows 10 Working with OneDrive

    Viewing 3 reply threads
    • Author
      Posts
      • #2304585 Reply
        CWBillow
        AskWoody Lounger

        I know I can add files to my OneDrive folder and they will be synced to the cloud.  But can I /How Do I sync files or folders to my OneDrive without moving them to the OD folder so that they remain available on my local drive in the original location but still sync to OneDrive?

        Copy instead of move them??

         

        Chuck Billow

      • #2304622 Reply
        mn–
        AskWoody Lounger

        The “normal” Windows 10 OneDrive client will only sync a specific location, but you can mark things within it as “always keep on this device”.

        If you do that and then change something in those directly in the cloud (or from a phone’s OneDrive client or something) it’ll pull the changes to local disk as soon as it notices them.

        Copy instead of move them??

        Well, that’d mean you keep the original as it was, and only sync the copy. Any later changes to the synced copy won’t be propagated to the original.

        If you really need to sync things from other locations, you may need to use a third-party client application. Those do exist.

        Windows 10 does have symbolic link capability, and those are evaluated only at access time so theoretically it should be possible to have the link somewhere else and the target inside the OneDrive folder. But, I really wouldn’t trust that kind of thing much without very comprehensive testing.

        • #2304657 Reply
          access-mdb
          AskWoody MVP

          When I tried using symbolic links some time ago they didn’t work – OneDrive just ignored them. It’s possible that has changed of course.

          • #2304694 Reply
            mn–
            AskWoody Lounger

            Well yes, OneDrive ignores them. But links from elsewhere targeting actual files in OneDrive means OneDrive never sees the link…

            • #2304758 Reply
              access-mdb
              AskWoody MVP

              Sorry, I see which way you were suggesting now. But I can’t see the point of this. I was trying to only have certain files uploaded to OneDrive servers but couldn’t because linking didn’t work in that scenario. I got round it by just having all my files in OneDrive (helped by getting MS365 and 1Tb of space). But having the link point to a OneDrive file seems a bit redundant to me. Maybe if Chuck says why he wants to do it, we could help better.

              • #2304788 Reply
                mn–
                AskWoody Lounger

                I was trying to only have certain files uploaded to OneDrive servers but couldn’t because linking didn’t work in that scenario.

                Yes, that’s why I wouldn’t trust it without comprehensive testing.

                Because many applications assume that links don’t exist and do all kinds of funny things… (And then there are the other kinds of applications that break OneDrive in other ways.)

                There are third-party clients for OneDrive, some of which will work better in certain situations… and worse in others.

                One of the things I’ve seen done with this was making sure that the important cloud data goes also on the on-premises backups… though that was really SharePoint Online instead of standard OneDrive.

      • #2305022 Reply
        CWBillow
        AskWoody Lounger

        Guys, I have some programs I use that having the data files continuously backed up is critical — not whole drive or even folders, but specific files.  For simplicity’s sake, say I have a bookmarks program, and I tried to have the data file reside on OneDrive, but ran into problems.  It wanted the data file on a local drive.  That’s OK, says I, because I will read/write to the local file and then have OD sync that file.

        So if I have the data file locally for access and use, and then a copy on OneDrive, can I then set just that file to continuously update the copy that is on OneDrive, in effect giving me continuous backups?

        Chuck Billow

        • #2305029 Reply
          mn–
          AskWoody Lounger

          May or may not work, depending on specifics… has to be tested.

          Strictly continuous can be very much of a problem, if the application has the file handle constantly open in exclusive mode. Many applications do, so the OneDrive client can only sync the file when the application is closed. (And I mean really closed, not just hidden. Certain very specific applications are known to be a bother that way.)

          Also many of these keep the file in an inconsistent state while running. You know it’s one of these if it has to “repair the file” or can come up with lost data it “should have written” after a BSOD or power loss.

          If your application doesn’t close the file and has exclusive access, you might be able to do a frequently recurring scheduled job with RoboCopy or some such that uses Shadow Copy (OneDrive client itself doesn’t, I believe) to make a copy of the file into a folder that’s in OneDrive. (MS SQL Server technically uses a variant of this – it only makes the file consistent on a Shadow Copy trigger. Which causes a performance hit, so not very nice if done too frequently.)

          Another application that behaves “nicely” can very much work with a file that’s in OneDrive and marked as “always keep on this device”. (Nicely as in, closes the file handle between writes, or keeps it in an appropriate shared mode.)

          So, very much depends on the specific application and how it’s been written.

          • #2305092 Reply
            access-mdb
            AskWoody MVP

            Yes you’re right mn-,  I’m not sure about other Office files but fro example it won’t upload Access files whilst they’re open. It does so it when you close them.

            One system that seems to backup those open files is File History. I have a weather app and all its files are backed up every hour on  FH, even though some are permanently open. When I had these files on OneDrive, it wouldn’t backup those open files (which is why I moved them out of the OneDrive folder). I would suggest you don’t mix OneDrive files and File History though I can’t remember what it was I found that caused problems.

            Does Robocopy have that shadow facility? I’ll have to check as it won’t copy open files either,

            • #2305122 Reply
              mn–
              AskWoody Lounger

              Does Robocopy have that shadow facility? I’ll have to check as it won’t copy open files either,

              Right, sorry, it doesn’t have that integrated. Misremembered myself too… used another tool in the script first to make the shadow that was then copied from. … right, “diskshadow” is in most Windows Server versions…

      • #2305131 Reply
        Paul T
        AskWoody MVP

        You can create shadow copies in any Windows version, assuming VSS is enabled.
        To find out if it’s enabled, open an Admin Command Prompt / Powershell.
        Type: vssadmin list providers

        This page has a nice script for creating / deleting snapshots.

        cheers, Paul

    Viewing 3 reply threads

    Please follow the -Lounge Rules- no personal attacks, no swearing, and politics/religion are relegated to the Rants forum.

    Reply To: Working with OneDrive

    You can use BBCodes to format your content.
    Your account can't use Advanced BBCodes, they will be stripped before saving.