Getting metrics from API?

Looking to pull some metrics from duplicacy and curious if there is a rest api or something I can use rather then scraping the dom …

Hey,

From what I have seen so far. Duplicacy doesn’t currently offer a REST API for directly pulling metrics. However, there are some alternative methods you can use to gather the data you need without resorting to DOM scraping.

Alternatives to Pull Metrics

  1. Duplicacy CLI:

    • The command-line interface (CLI) offers a variety of commands that can output useful information about backups, storage, and snapshots. You can script these commands and parse the output to gather metrics.
    • Example commands:
      duplicacy backup -stats
      duplicacy check -tabular
      duplicacy list
      
  2. Logs and Scripts:

    • You can configure Duplicacy to log detailed information and then write scripts to parse these logs. This method provides flexibility in extracting specific metrics you’re interested in.
    • Logs are typically found in the .duplicacy-web/logs directory for the web edition.
  3. Community Tools and Scripts:

    • There are several community-developed tools and scripts designed to enhance Duplicacy’s functionality. Some of these might help you extract and visualize metrics.
    • Check out projects like Duplicacy-Utils for inspiration or ready-to-use tools.

Example Script to Gather Metrics

Here’s a simple example of how you might use the CLI to gather some basic metrics:

#!/bin/bash

# Run backup command and capture stats
duplicacy backup -stats > backup_stats.log

# Parse the log file for specific metrics
grep "Total" backup_stats.log

Community and Forum Support

If you’re looking for more specific or advanced metrics, I recommend checking out the Duplicacy Forum. The community is quite active, and you might find scripts or advice tailored to your needs. ( Which your already here …lol ).

Feel free to share more details about the specific metrics you’re looking for, so someone can offer more targeted advice.

Hope this helps! You might be wondering, do I work here? No, but I did stay at a Holiday Inn Express last night.