PHP code example of aldarien / backup

1. Go to this page and download the library: Download aldarien/backup library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

aldarien / backup example snippets


[
  "source" => [
    "driver" => "mysql",
    "database" => [
      "host" => [
        "name" => "<hostname>",
        "[port]" => "<port>"
      ],
      "name" => "<database name>",
      "user" => [
        "name" => "<user name>",
        "password" => "<user password>"
      ]
    ]
  ],
  "output" => [
    "[files]" => [
      "[path]" => "<files path">
      "name" => "<filename>",
      "types" => [
        "<file type1>",
        "<file type2>"
      ]
    ],
    [
      "type" => "<file type>",
      "name" => "<filename>",
      "[path]" => "<file path>"
    ],
    [
      "type" => "<file type>",
      "name" => "<filename>"
    ]
  ],
  "backup" => [
    "location" => "source|file",
    "[file]" => "<filename>"
    "frecuency" => [
      "value" => <n>,
      "unit" => "hours|days|months"
    ]
  ]
];