meganz / MEGAcmd

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

Help with mega-put #869

Open gettons opened 1 year ago

gettons commented 1 year ago

MEGAcmd version: 1.4.0.0: code 1040000 Account e-mail: happy to provide if required PLAN: Pro I OS: TS 5.0.1.2425

Hello,

I am a new Mega user and need a little guidance on mega-cli.

  1. FIRST QUESTION As I need to copy some files/folders (approx. 15GB) from my QNAP to the Mega cloud drive, I am using the non-interactive cli, specifically the mega-put command. Reason why I am not using mega-sync is because I do not want to copy all files/folders and it does not seem to be an option to exclude certain files.

What I do not understand is how to check the status of the mega-put after launching it. Whether or not I use the '-q' option of mega-put when I launch the command, there does not seem to exist a way to keep track of the status. In fact, when I execute mega-put in interactive mode, if I type mega-transfers in another window does not show anything. Same applies if I run mega-put in non-interactive mode. I took a look at megacmdserver.log as I thought I would find some useful information in there, but whilst I see logs entries being generated,there is no clear indication about the status of the mega-put. Let alone I do not know how to pause/stop the mega-put if I wish to do so (unless I use the distruptive command mega-logout command) Thing is I ran a mega-put command a while ago and I have no clue whether it's still running, how much percentage of it has been completed, an ETA, etc.

  1. SECOND QUESTION Does mega-put automatically skip the copy for files if they already exist at the destination (using, I guess, hashing) ? It does not seem like there is an option available for mega-cmd to control this behaviour.

Thanks

polmr commented 1 year ago

Hi @gettons

MEGAcmd version: 1.4.0.0

You may want to consider upgrading to a newer one (See https://mega.io/cmd)

mega-sync is because I do not want to copy all files/folders and it does not seem to be an option to exclude certain files.

There is, see mega-exclude

mega-put when I launch the command, there does not seem to exist a way to keep track of the status.

Note that mega-transfers only list individual file transfers, it does not yet support tracking the progress of a folder upload.

if I type mega-transfers in another window does not show anything.

That's unexpected unless all file transfers have concluded or they have not yet begun (it may take a while to create the required folders. Consider using --show-completed option

Thing is I ran a mega-put command a while ago and I have no clue whether it's still running, how much percentage of it has been completed, an ETA, etc.

Currently, the best way for that would be not to use the -q option. You can also increase the log mode to VERBOSE (See mega-log --help), which would include the progress update messages sent from MEGAcmd Server to the mega-put client, but that would be hard to read/parse.

Does mega-put automatically skip the copy for files if they already exist at the destination (using, I guess, hashing)

Yep, it currently does (versions 1.4.0 and 1.6.3) by using some sparse hashing. Not configurable.