Duplicacy on USB stick - Portable

Hello,
I have tried to setup duplicacy to run a USB stick and back up to the cloud, in this case, google drive. I set it up to run on the first PC and it can backup. I then move the USB stick to the 2nd PC and when I try to run duplicacy backup, duplicacy asks me for the path for the google drive token. I then enter the path and then I can back up. I then move back to the first PC and try to run a backup, but again duplicacy asks me for the path of the token. I have even tried to set the path on both PCs eg. C:\Token\GCD… but that does not work either.

I can get it to work when I back up locally without encryption (i.e. no password), but for cloud storage I can not get it to work.

I think it would be great to be able setup a USB stick and then go to any computer, mine, friends, work etc and then run a a backup of the contents of the USB stick into the cloud.

Is this possible to setup and what do I need to do to get it running.

Cheers and thanks

You can use the set command to set the token file:

duplicacy set -key gcd_token -value /path/to/token

The key/value pair should be added to the .duplicacy/preferences file.

You can set the storage password the same way.

These passwords are also saved to the .duplicacy/keyring file in an encrypted form. However, You can’t encrypt the password on one machine and decrypt it on a different one. So you can only save the password in .duplicacy/preferences in plaintext.

Hello, Thanks that worked.

I see that the gcd token path is stored in the preferences file, which means it must be the same on all PCs. Being a USB stick, I cannot guarantee that the path will stay the same for each PC. I know you can fix a drive letter for a USB stock, but if I go to friends PC, I may not be able to do that and then the gcd token path would be different.

I was hoping that I could store the gcd token under the .duplicacy folder of the repository on the USB stick. Is there a way to store it there and make a reference to the token regardless of the drive letter path?

Also, on the 1st PC duplicacy backed up as expected, It checked files and only packed and backed up new files. However on the 2nd PC duplicacy would always re-pack all the files, see that they chunks have been already backed up, so no need to back up any files. So it would go through the whole file list again. It is like it doesn’t know that the files have been packed already. Any ideas why this behaviour?

cheers and thanks

You might be able to store the token file under the repository and use the relative path. I’m not sure if this works but it is worth a try. If not, then your only option is to write a simple bat file that gets the absolute path of the token file and sets the environment variable, and then calls duplicacy to run the backup.

Also, on the 1st PC duplicacy backed up as expected, It checked files and only packed and backed up new files. However on the 2nd PC duplicacy would always re-pack all the files, see that they chunks have been already backed up, so no need to back up any files. So it would go through the whole file list again. It is like it doesn’t know that the files have been packed already. Any ideas why this behaviour?

I suspect the timestamps of all files changed. You can run duplicacy cat -r 1 and duplicacy cat -r 2 and compare the timestamps of a file that had been repacked.

Hi,
Thanks again. Yeah relative paths seems to be working (better than writing a script)

The 2nd issue was a user error (me!). I was testing with 3 different USB sticks. I made changes to the preference file and then copied the preference file around. In the end the -id was the same on all three, but with different content, so duplicacy needed to keep verifying all the time.

Really very much appreciate your support and the software. This has solve an issue for me with movable devices.

Cheers and thanks again