Possible? NC Desktop Client only 1 way sync

Hi,

is it possible to disable the 2 way sync of the NC Desktop (Win) Client?
My NC is not the master storage for storing files. This is my PC. I prefer a 1 way sync to the NC instance only?
Possible?

Have not found and preferences to set this up.

search function – Nextcloud client app one way sync (aka backup)

1 Like

Other clients are not helpful because they do not copy timestamps etc

Honestley I don’t really see a usecase for that. If you don’t use the web interface of your Nextcloud to make changes to your files, you basically already have what you want. If you do use the web interface to make changes, you most likely want the changes to be synched back. But maybe that’s just me.

If you want to use your Nextcloud as backup target, you can use any tool that supports webDAV as a storage backend. Or you could mount the webDAV storage to your system as a network drive and then use system tools like robocopy on Windows or rsync on Linux, which should preserve the time stamps.

With the official client it is not possible at the moment, but feel free to upvote / comment the feature request on GitHub or make a pull request…

There is no backup software that keeps the timestamps?

The Nextcloud concept is to have a sync storage where the server is master. I understand the other way round, especially if you have a lot of data and organized in some structure and you only want to sync parts of it. Unfortunately, this logic is harder to be handled (you can add multiple sync points). Most sync solution do it with one sync folder…

If you are looking mainly for a backup solution, use a software that does exactly this and is compatible with webdav (and does consider timestamps).

I did it really easy, with rclone you can add whatever folder structure and say rclone to sync it to the Server. Nothing will be downloaded, but in case of deletion from the client, will be also deleted from the server. You can avoid it by copy command instead of sync. Here is a script example

2 Likes

@gas85

Seems that backups are packed and encrypted. I think this is not what helps here, isn’t it?

That depends on what exactley your goal is. We know what feature you want, but we don’t know why… Why do yo need your files unpacked and directley accessable on your Nextcloud? Backup cannot be the reason, because backups should idealy be immutable, otherwise they are not really backups. If you could explain what exactley your usecase is, maybe we could offer you a solution or provide some ideas how you can achieve your actual goal…

I never mentioned a backup. I have plenty backups of my files offline. Some of you guys mentioned backups.

I simply want to have copied some of my folders, not all, to have the data available on NC

I don’t need 2 way sinc. Recently NC had some problem ma followed by the deletion of files on my local PC. Wachse if the 2 way sinc. Having backups this was not a big issue. But I not willing to check all the time if files locally are deleted

In provided script yes, but it is done with other tool, rclone is only copied what was already encrypted by restic, if you do not need encryption, simply call rclone sync or copy, it will only care about to sync your client and server in direction you need.

1 Like

Ok I understand that, but this will lead to diffrent versions of the files, unless you only use your nextcloud for e.g. sharing the files, but without changing them in any way directley on your server.

That was unfortunate and certainly shoudn’t have happend and luckily it didn’t happen to me. But at least for me, this incident is not a reason to restrict my self using my Nextcloud’s full potential. If I just wanted to have a copy of my files on another device, I wouldn’t mess around with a relatively complex solution like Nextcloud. I would probably still go with simple NFS and SAMBA shares on my NAS.

Anyways… There are other tools out there. Just google “webdav synchronization”. If you want something with a nice UI that syncs in real time, you will probably have to pay for it. If you can live without realtime sync and a nice UI, I would also recommend rclone. You can automate it with a cronjob or run it as a system service.

BTW: I don`t wan to simply copy the files, before copying it should be checked which files are new or changed.
Sync to webdav worked with Robocopy, various backup tools (syncback, etc)., but ALL ignore the time stamps of the files and write the date and time of copy.

Maybe this is of any help…

https://serverfault.com/questions/288631/what-switches-can-robocopy-use-to-preserve-file-and-directory-times-on-the-targe

What I can think of is that you have all your data on a local computer. You just want to share specific current stuff, e.g. the things you are working on, or the pictures you want to share from last week-end. Unfortunately, symlinks are not supported since this could be a workaround…

I understand the problem of hokaido
I myself have had problems in the past, my local files were deleted without me being able to recover them. I can assure you if this happens to you you will be very angry

That’s what backups are for. That beeing said, it should of course not happen, that a sync client deletes data by itself. But it’s also possible that you delete something by mistake on your computer. And then the file will also get deleted on the “other side”. That’s why you always should have backups. No matter if you use one or two way synchronization.

I look at it this way:

the purpose of synchronization is to be able to use the same data on multiple devices and normally you want to have the same state of the data on all devices.

The purpose of a backups is to be able to recover your data in case you accidentally deleted something or the synchronisation tool messed something up :wink: