rsync actually syncs files in --test mode
When backupninja is started with --test option, rsync action does still actually sync files!
rsync should be invoked with --dry-run option when backupninja runs in --test mode.
#5 Updated by rhatto about 3 years ago
- Assignee changed from rhatto to shred
- QA Check changed from Info Needed to Dev Needed
Yes, I tested with ninjahelper and --dry-run is passed to rsync when the action is invoke in test mode. But I noted that the patch doesn't fix everything and metadata can still be rotated when the long format is used.
shred, could you provide a patch having the same check on the prepare_storage function? In that case we would not be testing if the action can create remote folders.
Another option would be to change rotate_* and setup_long_dirs_* functions to just try to create a dummy/test file/folder in the remote destination.
#6 Updated by shred about 3 years ago
Yes, you're right...
The attached patch will return from the prepare_storage function in test mode, so rotation will not be tested.
I'm sorry that I can only provide a patch for the easier solution, but I'm not very fluent with shell scripting. (I'd rather prefer Python... ;-) )
#8 Updated by rhatto about 3 years ago
- Assignee changed from rhatto to intrigeri
- QA Check changed from Ready for QA to Pass
It worked but I had to make another change.
Then the test suceeded. I'm fine with having the handler not trying rotation in the test mode, so I think it's ready to merge and close this bug.