Directory to be backed up.

Zhup     Jun 4 4:11AM 2017 CLI

Hello,

How can I define directory to be backed up? e.g. D:\family\photos.


gchen    Jun 4 10:11AM 2017

cd to that directory and run the init command:

cd d:\family\photos
duplicacy init repository_id storage_url

Then you can run any other commands if d:\family\photos is the current working directory:

cd d:\family\photos
duplicacy backup


Zhup    Jun 4 10:36AM 2017

Hello,

Thank you, but it does not work.

Duplicacy is in C:\duplicacy and it is indexing only C:\duplicacy.


Charles    Jun 4 5:34PM 2017

It would be nice if you could specify a directory to backup with something like -d, but for now you have to cd to the directory you want to back up first, then use a relative or absolute path to duplicacy. In your case, something like this...

cd D:\family\photos
c:\duplicacy\duplicacyExecutable options

For my batch file in Windows, I wrote the following script and run it from the location of the directory I want backed up. The ">>" writes the log to a file with the name and directory specified on the right.

::Run from repository location
CALL \Scripts\Duplicacy\FileSafeTimeStamp.bat
\Scripts\Duplicacy\duplicacy_win_x64_2.0.0.exe -log backup -vss -t 8 -stats >> \Scripts\Duplicacy\Log\Backup\duplicacy_backup_%filesafetimestamp%.log


Charles    Jun 4 5:39PM 2017

PS, I run this batch file with the following commands to backup E:\, my entire E drive, but the script named StartBackup.bat is in E:\Scripts\Duplicacy

E:
\Scripts\Duplicacy\StartBackup.bat


Christoph    Dec 30 11:44PM 2017

For my batch file in Windows, I wrote the following script and run it from the location of the directory I want backed up. The ">>" writes the log to a file with the name and directory specified on the right.

Is this the only way to save to the logs using CLI?


gchen    Dec 31 12:32PM 2017

Yes, that is the only way. The CLI version doesn't create log files automatically while the GUI version does.


towerbr    Jan 1 8:26AM 2018

I use the same solution: ">>"

It works perfectly and gives me full control of the information I want to summarize later.


Christoph    Jan 1 12:29PM 2018

If I call a batch file instead of duplicacy proper with the windows task scheduler, do I not lose the possibility of having task scheduler to check whether another duplicacy instance is running?

For that reason, I added the >> ... part to the "add arguments" field in task scheduler so that i now says -log backup -t 8 -stats -vss -storage mypassport >> D:\Dropbox\.duplicacy\logs but when I do that, the task fails to start at all...

BTW: I can't find any documentation for the -log option...


towerbr    Jan 1 4:01PM 2018

I set the scheduler to call a main batch, which in turn calls other batches (passing parameters) that trigger the duplicacy itself. Due to my scheduling settings (hours) I have no problem with overlapping executions.

I donĀ“t use arguments in the scheduler, only within the batches.

The -log parameter is only for the GUI version