It feels like you're looking for something like git-annex (https://git-annex.branchable.com/). I've never used it but read a bit about it, here's how you would use it:
- Install git-annex on your cloud
- Tell git-annex that you have a remote there
- Do your stuff on your local drive, push to the cloud when it's done
- If some of the files are not needed locally, tell git-annex to drop them from your local drive. git-annex knows that there is another copy in a safe storage
- If you want to work on some files you don't have, ask git-annex to transfer them to you.
- Install git-annex on your cloud
- Tell git-annex that you have a remote there
- Do your stuff on your local drive, push to the cloud when it's done
- If some of the files are not needed locally, tell git-annex to drop them from your local drive. git-annex knows that there is another copy in a safe storage
- If you want to work on some files you don't have, ask git-annex to transfer them to you.
The manual steps might be a bit tedious, so git-annex also has an assistant mode that is a good-enough copy of dropbox (https://git-annex.branchable.com/assistant/). See the archival walkthrough, that seems to fit your use case (https://git-annex.branchable.com/assistant/)
(I have more or less the same need, but haven't committed to doing it just yet)