OneDrive es una plataforma que permite almacenar archivos, documentos, material personal, etc., en un solo espacio, además puede compartirlos con otras personas y tener accesos a ellos en cualquier dispositivo.
Pasos para sincronizar archivos y carpetas en una distribución basada en Debian 10.
Pre-requisitos
Es necesario contar con un cuenta de microsoft.
root@server-1:/home/jorgedison# git clone https://github.com/abraunegg/onedrive
cd onedrive/
root@server-1:/home/jorgedison/onedrive# sudo apt install build-essential
root@server-1:/home/jorgedison/onedrive# sudo apt install libcurl4-openssl-dev
root@server-1:/home/jorgedison/onedrive# sudo apt install libsqlite3-dev
root@server-1:/home/jorgedison/onedrive# sudo apt install pkg-config
root@server-1:/home/jorgedison/onedrive# curl -fsS https://dlang.org/install.sh | bash -s dmd
dmd-2.096.1 already installed
Using dub 1.25.0 shipped with dmd-2.096.1
Run `source ~/dlang/dmd-2.096.1/activate` in your shell to use dmd-2.096.1.
This will setup PATH, LIBRARY_PATH, LD_LIBRARY_PATH, DMD, DC, and PS1.
Run `deactivate` later on to restore your environment.
root@server-1:/home/jorgedison/onedrive# source ~/dlang/dmd-2.096.0/activate
(dmd-2.096.1)
root@server-1:/home/jorgedison/onedrive# ./configure
root@server-1:/home/jorgedison/onedrive# make clean; make
root@server-1:/home/jorgedison/onedrive# sudo make install
Configuración
onedrive
Configuring Global Azure AD Endpoints
Authorize this app visiting:
https://login.microsoftonline.com/.....
La url generada la copiamos y pegamos en un navegador, nos pedirá ingresar las credenciales de microsoft.
Si las credenciales son correctas nos redirigirá a una pagina en blanco, copiar la url y pegarla en la terminal, opcioń “Enter the response uri”
Enter the response uri: https://login.microsoftonline.com/....
Application has been successfully authorised, however no additional command switches were provided.
Para visualizar la configuración se puede usar el comando –display-config
root@server-1:~/OneDrive# onedrive --display-config
onedrive version = v2.4.11-5-gb7eedbd
Config path = /root/.config/onedrive
Config file found in config path = false
Config option 'check_nosync' = false
Config option 'sync_dir' = /root/OneDrive
Config option 'skip_dir' =
Config option 'skip_file' = ~*|.~*|*.tmp
Config option 'skip_dotfiles' = false
Config option 'skip_symlinks' = false
Config option 'monitor_interval' = 300
Config option 'min_notify_changes' = 5
Config option 'log_dir' = /var/log/onedrive/
Config option 'classify_as_big_delete' = 1000
Config option 'upload_only' = false
Config option 'no_remote_delete' = false
Config option 'remove_source_files' = false
Config option 'sync_root_files' = false
Selective sync 'sync_list' configured = false
Business Shared Folders configured = false
Podemos probar creando en la terminal un archivo “jorge.log” en la ruta /root/OneDrive
Y validar luego en la plataforma OneDrive.