meganz / MEGAcmd

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

MEGAcmd Windows Client - Ability to Configure Local Cache Location? #966

Closed sk0rabu closed 2 months ago

sk0rabu commented 2 months ago

Hi, just download MEGAcmd to use in conjunction with rclone to automate my backup tasks.

I chose to set up webdav over MEGAcmd first and expose the remote address to rclone, and initiate file transfers using the latter.

The initial sync went okay but soon after transferring some files I started getting 500 errors for all subsequent transfers.

I logged out -> in megacmd again, restarted my PC, same error. Then I realized my C:\ has had no space left. It turns out that megacmd would set up its local cache at C:\Users\$USERNAME\AppData\Local\MEGAcmd\.megaCmd which includes file transfer caches that started piling up and soon exhausted my C drive's free space (I only allocated ~100GB to it and with ~40GB free it won't last long before I had to empty the folder again).

I tried to set up a symlink pointing to another drive, and megacmd server won't start. If I move megacmd to a different directory, it still tries to use the C:\Users\$USERNAME\AppData\Local\MEGAcmd\.megaCmd directory for local caches.

Is there a way I can specify my own local cache location?

Many thanks in advance.

sk0rabu commented 2 months ago

Was able to resolve the issue -- the idea is still to set up a symlink but I had to make sure the target folder's & source folder's permissions match.

This is achieved by [https://superuser.com/questions/696004/copying-a-directory-by-retaining-its-permission](something like this) .

Then I ran the following in Powershell (with elevated status) - New-Item -ItemType SymbolicLink -Path PATH\TO\.megaCmd -Target "PATH\TO\FOLDER\YOU\JUST\COPIED".

Still, it would be great to have an option to set up local cache on a non-system drive.