Hello,
How can I define directory to be backed up? e.g. D:\family\photos.
Hello,
How can I define directory to be backed up? e.g. D:\family\photos.
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
Hello,
Thank you, but it does not work.
Duplicacy is in C:\duplicacy and it is indexing only C:\duplicacy.
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
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
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?
Yes, that is the only way. The CLI version doesn’t create log files automatically while the GUI version does.
I use the same solution: “>>”
It works perfectly and gives me full control of the information I want to summarize later.
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…
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