meganz / MEGAcmd

Command Line Interactive and Scriptable Application to access MEGA
Other
1.95k stars 407 forks source link

One way sync #687

Open akyag opened 2 years ago

akyag commented 2 years ago

I was using rclone to backup my folder to mega but it failed over and over. Support made me aware of this tool. sync worked perfectly till I tried to sync an existing folder. which resulted in remote data being synced with my local. This is not what I wanted. Is it possible to sync only one way? from local to remote and keep the mirror copy of local only. This is possible using rclone.

voc-mega commented 2 years ago

MEGAsync does not currently offer the option to one-way sync however our developers are working on this feature, which will be available in a future release.

Currently, as a workaround, you can achieve one-way syncing by using the manual "Upload" and "Download" features.

You can use the "Upload" feature from the MEGAsync user interface to manually upload the same file/folder to the same destination folder in your MEGA Cloud Drive.

MEGAsync will detect the files that are already there and only upload the new or modified ones. This way you can delete the folder on your computer afterward and this action won't be reflected in your Cloud Drive.

In the same way, the "Download" feature will allow you to download files/folders without syncing them. This way you can delete the folder in your Cloud Drive afterward and this action won't be reflected in your locally synced folder.

As an alternative, you can simply delete the sync path after syncing. Sync your folder and, once the synchronisation has completed, go to Settings/Preferences - Sync and manually un-tick the nominated sync path or delete it.

You can then delete the folder/file on your computer and this action won't be reflected on your Cloud Drive, or vice-versa.

WladyX commented 2 years ago

one could also do it with rclone.

VD171 commented 1 year ago

Any method for One-way sync, please?

firrsefu commented 1 year ago

You can use the "Upload" feature from the MEGAsync user interface to manually upload the same file/folder to the same destination folder in your MEGA Cloud Drive.

MEGAsync will detect the files that are already there and only upload the new or modified ones. This way you can delete the folder on your computer afterward and this action won't be reflected in your Cloud Drive.

Is mega-put the CLI command that does the same as "Upload" does in MEGAsync? If not, what is the CLI equivalent of "Upload"?

VD171 commented 1 year ago

You can use the "Upload" feature from the MEGAsync user interface to manually upload the same file/folder to the same destination folder in your MEGA Cloud Drive. MEGAsync will detect the files that are already there and only upload the new or modified ones. This way you can delete the folder on your computer afterward and this action won't be reflected in your Cloud Drive.

"Upload" and "Synchronize" features does NOT share the same folder in MEGA. "Synchronize" feature sends files to Cloud Drive. "Upload" feature sends files to Inbox Drive.

You can't modify/move files sent by "Upload" feature.

VD171 commented 1 year ago

Is mega-put the CLI command that does the same as "Upload" does in MEGAsync? If not, what is the CLI equivalent of "Upload"?

No. See here: https://github.com/meganz/MEGAcmd/blob/master/contrib/docs/BACKUPS.md

firrsefu commented 1 year ago

Yeah, I tried mega-backup and that just dumbly copies files from source to destination. That's no good when I have 1TB of files and an 8Mbps upload DSL link. I used to have a remote server running rsync, so I could use rsync which uploaded only the changes (a few hundreds of MB most days). When I tried mega-backup it took a few weeks to upload the first backup (fair enough for 1.1TB and a slow link) but then the subsequent backup wasn't smart enough to use the data already uploaded to Mega.

VD171 commented 1 year ago

Yeah, I tried mega-backup and that just dumbly copies files from source to destination. That's no good when I have 1TB of files and an 8Mbps upload DSL link. I used to have a remote server running rsync, so I could use rsync which uploaded only the changes (a few hundreds of MB most days). When I tried mega-backup it took a few weeks to upload the first backup (fair enough for 1.1TB and a slow link) but then the subsequent backup wasn't smart enough to use the data already uploaded to Mega.

I don't want multiple backups too. I want a just one-single backup, exactly same the one-way sync of the "Upload" feature from the megasync.

firrsefu commented 1 year ago

https://rclone.org/mega/ looks promising (last update was 2023-03-14, well after akyag above had problems with rclone and Mega.

akyag commented 1 year ago

I can confirm rclone has been working better these days. I haven't had any issue with sync. :)

firrsefu commented 1 year ago

Thanks. Unfortunately for me rclone on Debian doesn't support Mega.nz storage (due to a missing go-mega backend). I've requested it be added (not having the skills to volunteer myself) - see:

VD171 commented 1 year ago

megasync is always STUCKED. megacmd has not useful backup feature. Certainly, I will NOT renew my yearly membership with mega. Mega is encrypted, but if we pay for a (cheap) KVM server, we can encrypt it too. With a KVM, we can use rsync, ftp/sftp, ssh, xrdp and many other features. The only one useful feature in mega, is the file versioning. But... File versioning is NOT available for backups made from megasync or megacmd... LOL, LOL, LOL.

agatakotecka commented 8 months ago

one could also do it with rclone.

rclone is crap and doesn't have GUI, a must in 21st century telling people to use ancient command lines today is like telling them to use Nokia 6610

VD171 commented 8 months ago

one could also do it with rclone.

rclone is crap and doesn't have GUI, a must in 21st century telling people to use ancient command lines today is like telling them to use Nokia 6610

MEGAcmd doesn't have GUI. If we are here, we prefer command lines.

akyag commented 8 months ago

I can confirm rclone has been working better these days. I haven't had any issue with sync. :)

Sadly I have to retract this... Mega rate limits rclone after like 5 mins. I need to try with rclone mount and see what happens. :(