XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Export backup reports

    Scheduled Pinned Locked Moved Backup
    5 Posts 4 Posters 90 Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      McHenry
      last edited by

      I have the Backup Reports plugin working and it sends an email after each report.

      I would like to export the backup logs for the last 3 months and I have tried:

      xo-cli backupNg.getLogs
      

      However the export appears to be truncated ending with:

      ... 1919 more items
      
      julien-fJ 1 Reply Last reply Reply Quote 0
      • olivierlambertO Offline
        olivierlambert Vates 🪐 Co-Founder CEO
        last edited by

        Ping @julien-f

        1 Reply Last reply Reply Quote 0
        • julien-fJ Offline
          julien-f Vates 🪐 Co-Founder XO Team @McHenry
          last edited by

          @McHenry You can ask for the JSON format instead of a human readable excerpt:

          xo-cli backupNg.getLogs --json
          
          M 1 Reply Last reply Reply Quote 1
          • M Offline
            McHenry @julien-f
            last edited by McHenry

            @julien-f

            Thank you. Can a filter be used too?

            root@xo:~# xo-cli --list-commands | grep backupNg.getLogs
            `--list-commands` is deprecated and will be removed in the future, use `list-commands` subcommand instead
            
            backupNg.getLogs [after=<number|string>] [before=<number|string>] [limit=<number>] *=<unknown type>
            root@xo:~#
            
            root@xo:~# xo-cli backupNg.getLogs --json limit=500
            āœ– invalid parameters
              property @./limit: must be number
            root@xo:~#
            
            florentF 1 Reply Last reply Reply Quote 0
            • florentF Offline
              florent Vates 🪐 XO Team @McHenry
              last edited by

              @McHenry xo-cli backupNg.getLogs --json limit='json:500' should work ( the command line parameter are considered as string )

              1 Reply Last reply Reply Quote 1
              • First post
                Last post