campelo / backup-server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Table of contents

  1. Backup server
    1. Config.py
  2. File manager
    1. Example
    2. Running
  3. Dependencies

backup-server

config.py

Create a config.py to hold your server configurations.

AUTHORIZED_ACCOUNTS is used to limitate what accounts can use this server CLIENT_ID application id registered on google. CLIENT_SECRET application secret registered for this application REDIRECT_URI application redirect uri registered on google UPLOAD_FOLDER local folder name to save documents.

Your config.py should look like this.

AUTHORIZED_ACCOUNTS = ["email1@gmail.com", "email2@gmail.com"]
CLIENT_ID = 'client-id'
CLIENT_SECRET = 'client-secret'
REDIRECT_URI = 'redirect-uri'
UPLOAD_FOLDER = '/home/{usr}/backup'

file-manager

Move/organize all media files on classified subfolders year/month/day. Metadata is used to find all date information to create those folders.

Example

If we use /my-folder/pictures all data will be moved to /my-folder/pictures/yyyy/mm/dd.

Running

python3 file-manager.py /mnt/c/Users/myUser/Pictures

Dependencies

sudo apt-get update
sudo apt-get install python3-pip

It might be necessary to add this repository

sudo add-apt-repository universe

exifread

pip install exifread

ffprobe

sudo apt-get install ffmpeg

About

License:MIT License


Languages

Language:Python 100.0%