PHP Classes

PHP DropBox Backup Uploader: Backup local files as a ZIP archive to Dropbox

Recommend this page to a friend!
  Info   View files Example   View files View files (8)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 556 This week: 1All time: 5,471 This week: 560Up
Version License PHP version Categories
ddb 1.2MIT/X Consortium ...5PHP 5, Files and Folders
Description 

Author

This class can backup local files as a ZIP archive sent to Dropbox

It handles the OAuth authorization process to obtain a token to access an API on behalf of the current Web user.

The class create a ZIP archive with files from a directory to backup.

The ZIP archive is sent to the DropBox server using requests sent to is API.

Innovation Award
PHP Programming Innovation award nominee
December 2014
Number 2


Prize: One downloadable e-book of choice by O'Reilly
Dropbox is a popular cloud based file storage system. It is usually used by desktop or mobile computers, but it can also be used by Web applications using its API.

This class provides a backup solution for Web applications using Dropbox API to store backup files.

Manuel Lemos
Picture of Ettore Moretti
  Performance   Level  
Name: Ettore Moretti is available for providing paid consulting. Contact Ettore Moretti .
Classes: 12 packages by
Country: Italy Italy
Age: ???
All time rank: 107741 in Italy Italy
Week rank: 416 Up16 in Italy Italy Up
Innovation award
Innovation award
Nominee: 3x

Example

<?php
session_start
();
require_once
'dbb/Dbb.php';

$Dbb = new Dbb();
   
$Dbb->dropbox_auth();

if(
$Dbb->dropbox_isConnected()){
   
//Start Backup
   
$uploadResult=$Dbb->backupStart();
    echo
"<pre>";
   
print_r($uploadResult);
}


Details

[IT] 1. Ottieni una copia dell'sdk di dropbox (https://www.dropbox.com/developers/core/sdks/php). IMPORTANTE!!!!! Se usi composer ricordati di modificare la require dell'autoload nel file dbb/Dbb.php alla riga:11 2. Crea una dropbox app (https://www.dropbox.com/developers/apps) IMPORTANTE!!! Il link di redirect che inserirete nella dropbox app, dovrà essere il link alla pagina "dbb/Dbb_landing.php" 3. Modifica le configurazioni nel file dbb/Dbb_config.php di conseguenza 4.Creare il db e\o la tabella users => script "dbb.sql" (se hai necessità di modificare i puntamenti al db, puoi modificare il codice della classe Dbb nei metodi : getUserDetail() e setUserDetail()) Lanciando l'index file per la prima volta, verrete reindirizzati sui server di dropbox per confermare l'uso dell'applicazione(*) in seguito i file presenti nella cartella Backup verranno caricati sui server di dropbox nella cartella "Applicazioni/<nomeApp>/<your Dropbox_backupPath>" (*) una volta recuperato, il token verrà scaricato e salvato nel db e i successivi upload non richiederanno più la conferma. [EN] 1. Get a copy of the SDK dropbox (https //www.dropbox.com/developers/core/sdks/php). IMPORTANT !!!!! If you are using Composer remember to change the require of autoload file dbb / Dbb.php at line 11 2. Create a Dropbox app (https //www.dropbox.com/developers/apps) IMPORTANT !!! The link redirects you input into the Dropbox app, will be the link to the page 'dbb / Dbb_landing.php' 3. Edit the configuration file dbb / Dbb_config.php 4.Create the db and \ or the users table => script 'dbb.sql' (if you need to change the tracking points to the database, you can modify the code of the class Dbb methods: getUserDetail () and setUserDetail ()) Launching the index file for the first time, you will be redirected on the servers of dropbox to confirm the use dell'applicazione(*) following the files in the Backup folder will be uploaded on the servers of dropbox folder in 'Applications/ <nomeapp> / <your Dropbox_ Backuppath>' (*) once recovered, the token will be downloaded and saved in the db and the subsequent upload does not require further confirmation.

  Files folder image Files  
File Role Description
Files folder imageBackup (1 file)
Files folder imagedbb (3 files)
Accessible without login Plain text file dbb.sql Data Auxiliary data
Accessible without login Plain text file index.php Example Example script
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.txt Doc. Documentation

  Files folder image Files  /  Backup  
File Role Description
  Accessible without login Plain text file ExampleFile.xml Data Auxiliary data

  Files folder image Files  /  dbb  
File Role Description
  Plain text file Dbb.php Class Class source
  Accessible without login Plain text file Dbb_config.php Conf. Application script
  Accessible without login Plain text file Dbb_landing.php Aux. Application script

 Version Control Unique User Downloads Download Rankings  
 100%
Total:556
This week:1
All time:5,471
This week:560Up