Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 19/02/2012, à 21:42

cosmobob

[Script] Client Hubic pour linux ;)

Hello wink
avant la sortie du client officiel, voici (en libre) un script bash qui crée un point de montage sur hubic (le service de stockage online d'OVH, cf www.ovh.fr/hubiC/)

wget http://ubunt.u.free.fr/hubicmount
chmod ugo+rx hubicmount
sudo mv hubicmount /usr/bin

ce script requiert l'installation de wdfs (monte des filesystem webdav en userspace, c'est à dire sans besoin de root wink)

wget http://ubunt.u.free.fr/installwdfs.sh
chmod u+x installwdfs.sh
sudo ./installwdfs.sh

Voici l'utilisation
./hubicmount -l <email> -p <passwd> -o umask=022 -o uid=1000 $HOME/hubic

et pour démonter:
fusermount -u $HOME/hubic

(NB : remplacer $HOME/hubic par votre point de montage)

comme il n'a pas besoin de root, on peut monter son disque hubic via le crontab de l'utilisateur et faire des rsync dessus pour gérer soi meme les sauvegardes big_smile

#!/bin/bash

#    Name : hubicmount
#    Copyright (C) 2012  cosmobob
#    from http://www.protocol-hacking.org/post/2012/01/29/Hubic%2C-maintenant-vraiment-ubiquitous
#
#    This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#    You should have received a copy of the GNU General Public License along
#    with this program; if not, write to the Free Software Foundation, Inc.,
#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.


MAIN_HOST="https://ws.ovh.com"

HOST_NAS_LOGIN="$MAIN_HOST/cloudnas/r0/ws.dispatcher/nasLogin"
HOST_GET_NAS="$MAIN_HOST/cloudnas/r0/ws.dispatcher/getNas"
HOST_GET_CREDENTIALS="$MAIN_HOST/cloudnas/r0/ws.dispatcher/getCredentials"

HUBIC_LOGIN=""
HUBIC_PASSWORD=""
MOUNTPOINT=""
WDFS_OPTS=()
VERBOSE="False"

DEBUG="False"

EXEC=$(basename "$0")

DEPENDENCIES=('wdfs' 'fusermount')


check_dependencies()
{
     for package in "${DEPENDENCIES[@]}" ; do
        VAL=$(whereis "$package" | awk ' $2!="" { print $2 }')
        if [ "x$VAL" == "x" ]; then
            echo "Missing dependency : $package"
            echo "Install package $package before using $EXEC"
        fi
    done
}

trace_debug()
{
    if [ "x$DEBUG" == "xTrue" ] ; then
        echo "$1" 1>&2
    fi
}

function urlencode()
{
    EncodeEOL="no"
    echo "$@" | awk '
    BEGIN {
        EOL = "%0A"        # "end of line" string (encoded)
        split ("1 2 3 4 5 6 7 8 9 A B C D E F", hextab, " ")
        hextab [0] = 0
        for ( i=1; i<=255; ++i ) ord [ sprintf ("%c", i) "" ] = i + 0
        if ("'"$EncodeEOL"'" == "yes") EncodeEOL = 1; else EncodeEOL = 0
    }
    {
        encoded = ""
        for ( i=1; i<=length ($0); ++i ) {
            c = substr ($0, i, 1)
            if ( c ~ /[a-zA-Z0-9.-]/ ) {
                encoded = encoded c        # safe character
            } else if ( c == " " ) {
                encoded = encoded "+"    # special handling
            } else {
                # unsafe character, encode it as a two-digit hex-number
                lo = ord [c] % 16
                hi = int (ord [c] / 16);
                encoded = encoded "%" hextab [hi] hextab [lo]
            }
        }
        if ( EncodeEOL ) {
            printf ("%s", encoded EOL)
        } else {
            print encoded
        }
    }
    END {
        #if ( EncodeEOL ) print ""
    }
    ' 
}

function myparse()
{
    echo "$@" | awk -F "," '
    BEGIN {
        val=0
    }
    {
        OFS="\t"
        for (i=1; i<=NF; i++)
        {
            buffer=""
            for ( j=1; j<=length ($i); ++j )
            {
                c = substr ($i, j, 1)
                if ( c == "{" )
                {
                    if ( length(buffer) > 0 ) {
                        print val, buffer
                    }
                    val=val+1
                    buffer=""

                }
                else if ( c == "}" ) 
                {
                    if ( length(buffer) > 0 ) {
                        print val, buffer
                    }
                    val=val-1
                    buffer=""
                }
                else
                {
                    buffer=buffer c
                }
            }
            if ( length(buffer) > 0 ) {
                print val, buffer
            }
        }
    }

    ' | sed 's/\":/\t/g;s/\"//g'

}

# 1 host
# 2 login
# 3 password
function postNasLogin()
{
    DATA="session=&params={\"email\":\"""$(urlencode $2)""\",\"password\":\"""$(urlencode $3)""\"}"
    trace_debug "$DATA"
    RET=$(wget -q -O - --header "Content-type: application/x-www-form-urlencoded" --post-data=$DATA $1)
    trace_debug "$RET"
    myparse "$RET" | awk -F "\t" '
        BEGIN {
            last_1=""
        }
        $1==1 { last_1=$2 }
        last_1=="answer" && $1==2 && $2=="id" { print $3 }
        '
}

# 1 host
# 2 id
function postGetNas()
{
    DATA="session=""$2"
    trace_debug "$DATA"
    RET=$(wget -q -O - --header "Content-type: application/x-www-form-urlencoded" --post-data=$DATA $1)
    trace_debug "$RET"
    myparse "$RET" | awk -F "\t" '
        BEGIN {
            last_1=""
        }
        $1==1 { last_1=$2 }
        last_1=="answer" && $1==2 && $2=="url" { print $3 }
        '
}

# 1 host
# 2 id
function postGetCredentials()
{
    DATA="session=""$2"
    trace_debug "$DATA"
    RET=$(wget -q -O - --header "Content-type: application/x-www-form-urlencoded" --post-data=$DATA $1)
    trace_debug "$RET"
    myparse "$RET" | awk -F "\t" ' 
        BEGIN { 
            last_1=""
        }

        $1==1 { last_1=$2 }
        last_1=="answer" && $1==2 && ( $2=="secret" || $2=="username" ) { OFS="\t" ; print $2, $3 }
        '
}

usage()
{
cat << EOF
usage: $EXEC [options] mountpoint
ex: $EXEC -l login -p password /mnt/hubic
REQUIRED OPTIONS:
   -l      Hubic login email
   -p      Hubic password
OTHER OPTIONS:
   -h      Show this message
   -o      Option to pass to wdfs (ex: -o umask=022)
   -v      Verbose mode
NOTE:
   Please use fusermount -u mountpoint to unmount.
EOF
}

# 1 username
# 2 password
# 3 url
# Ok if there are spaces in mountpoint ;)
function create_commandline()
{
    WDFS_OPTS=("-o" "username=$1" "-o" "password=$2" "${WDFS_OPTS[@]}" "$3" "$MOUNTPOINT")
    First="True"
    for val in "${WDFS_OPTS[@]}" ; do
        if [ "x$First" == "xTrue" ] ; then
            printf "%s" $val
            First="False"
        else
            printf "\0%s" $val
        fi
    done;
}

##################################################################################################################################
##################################################################################################################################
##################################################################################################################################
##################################################################################################################################

RET=$(check_dependencies)
if [ "x$RET" != "x" ]; then
    echo "$RET"
    exit
fi

SHOW_USAGE="False"
while getopts "l:p:o:hv" OPTION
do
    case "$OPTION" in
    h)
        SHOW_USAGE="True"
        ;;
    l)
        HUBIC_LOGIN=$OPTARG
        ;;
    p)
        HUBIC_PASSWORD=$OPTARG
        ;;
    v)
        VERBOSE="True"
        ;;
    o)
        WDFS_OPTS=("${WDFS_OPTS[@]}" '-o' "$OPTARG")
        ;;
    esac
done

MOUNTPOINT="${!OPTIND}"
if [ "x$SHOW_USAGE" == "xTrue" ] ; then
    usage
    exit

elif [ "x$HUBIC_LOGIN" == "x" -o "x$HUBIC_PASSWORD" == "x" ]; then
    echo "Missing login or password."
    usage
    exit
elif [ "x$MOUNTPOINT" == "x" ]; then
    echo "Missing mountpoint."
    usage
    exit
fi


SESSION_ID=$(postNasLogin $HOST_NAS_LOGIN $HUBIC_LOGIN $HUBIC_PASSWORD)
trace_debug "session_id: $SESSION_ID"

if [ "x$SESSION_ID" != "x" ] ; then

    URL_RET=$(postGetNas $HOST_GET_NAS $SESSION_ID)

    CREDENTIALS=$(postGetCredentials $HOST_GET_CREDENTIALS $SESSION_ID)

    trace_debug "credentials"
    trace_debug "$CREDENTIALS"

    USERNAME=$(echo "$CREDENTIALS" | awk -F "\t" ' $1=="username" { print $2 }')
    PASSWORD=$(echo "$CREDENTIALS" | awk -F "\t" ' $1=="secret" { print $2 }')

    if [ "x$VERBOSE" == "xTrue" ]; then
        echo -n "wdfs "
        create_commandline $USERNAME $PASSWORD $URL_RET | xargs -0 -n1 -I {} echo -n {}" "
        echo
    fi

    create_commandline $USERNAME $PASSWORD $URL_RET | xargs -0 wdfs
else
    echo "Unable to login to hubic" 1>&2
fi

Dernière modification par cosmobob (Le 19/02/2012, à 23:26)

Hors ligne

#2 Le 19/02/2012, à 22:00

ftarkin

Re : [Script] Client Hubic pour linux ;)

Merci ^^


Ordi perso monté en Core i3, 4 Go RAM Voyager 12.04 64
Dell Latitude E6210 (Core i3, 6 Go DDR3) Voyager 12.04 64
HP Z800 (biproc Xeon QuadCore 18 Go DDR3) Voyager 12.04 64

Hors ligne

#3 Le 20/02/2012, à 20:49

killman

Re : [Script] Client Hubic pour linux ;)

Merci bien cosmobob !

Hors ligne

#4 Le 20/02/2012, à 21:07

ftarkin

Re : [Script] Client Hubic pour linux ;)

Puis avec les bons alias bashrc qui vont bien ont mount de demount 'fingers in the noze'... C'est bien ce truc...


Ordi perso monté en Core i3, 4 Go RAM Voyager 12.04 64
Dell Latitude E6210 (Core i3, 6 Go DDR3) Voyager 12.04 64
HP Z800 (biproc Xeon QuadCore 18 Go DDR3) Voyager 12.04 64

Hors ligne

#5 Le 20/02/2012, à 23:02

fut

Re : [Script] Client Hubic pour linux ;)

Merci beaucoup, c'est super! smile

Si certains ont un petit message d'erreur de type

No package 'glib-2.0' found

N'hésitez pas

sudo apt-get install libglib2.0-dev

Dernière modification par fut (Le 20/02/2012, à 23:04)

Hors ligne

#6 Le 21/02/2012, à 01:10

cosmobob

Re : [Script] Client Hubic pour linux ;)

héhé merci! wink
j'vais écrire un script hubicrsync, parce que le "problème" pour l'instant c'est que coté serveur OVH ca rame à mort quand on uploade un gros fichier (or, les cp ou autres de wdfs sont asynchrones, et quand on fait beaucoup de cp de suite, ca rend vite la main, puis tout s'arrete (genre nombre max de threads en meme temps atteints..)
j'ai trouvé comment s'en sortir pour avoir un truc a peu pres fiable avec rsync -n (qui donne la liste des diff sans rien faire), + cadaver pour les uploads (pas asynchrones, du coup on évite de faire tout planter en allant trop vite pour les serveurs OVH à qui on demande de faire trop de trucs en même temps)
++

Dernière modification par cosmobob (Le 21/02/2012, à 01:11)

Hors ligne

#7 Le 23/02/2012, à 11:29

hackman61

Re : [Script] Client Hubic pour linux ;)

Bonjour, moi j'ai un soucis :

root@z-push:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 11.10
Release:        11.10
Codename:       oneiric
root@z-push:~#

Donc voila mon soucis :..

root@z-push:~# sudo ./installwdfs.sh
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
libneon27-dev est déjà la plus récente version disponible.
Les paquets suivants ont été installés automatiquement et ne sont plus nécessaires :
  libgnutlsxx26 libtasn1-3-dev libgpg-error-dev libgcrypt11-dev libgnutls-dev libneon27-gnutls
Veuillez utiliser « apt-get autoremove » pour les supprimer.
0 mis à jour, 0 nouvellement installés, 0 à enlever et 3 non mis à jour.
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
libssl-dev est déjà la plus récente version disponible.
Les paquets suivants ont été installés automatiquement et ne sont plus nécessaires :
  libgnutlsxx26 libtasn1-3-dev libgpg-error-dev libgcrypt11-dev libgnutls-dev libneon27-gnutls
Veuillez utiliser « apt-get autoremove » pour les supprimer.
0 mis à jour, 0 nouvellement installés, 0 à enlever et 3 non mis à jour.
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
libfuse-dev est déjà la plus récente version disponible.
Les paquets suivants ont été installés automatiquement et ne sont plus nécessaires :
  libgnutlsxx26 libtasn1-3-dev libgpg-error-dev libgcrypt11-dev libgnutls-dev libneon27-gnutls
Veuillez utiliser « apt-get autoremove » pour les supprimer.
0 mis à jour, 0 nouvellement installés, 0 à enlever et 3 non mis à jour.
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
libglib2.0-dev est déjà la plus récente version disponible.
Les paquets suivants ont été installés automatiquement et ne sont plus nécessaires :
  libgnutlsxx26 libtasn1-3-dev libgpg-error-dev libgcrypt11-dev libgnutls-dev libneon27-gnutls
Veuillez utiliser « apt-get autoremove » pour les supprimer.
0 mis à jour, 0 nouvellement installés, 0 à enlever et 3 non mis à jour.
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
E: Impossible de trouver le paquet fusermount
--2012-02-23 11:29:05--  http://noedler.de/projekte/wdfs/wdfs-1.4.2.tar.gz
Résolution de noedler.de... 193.33.21.198
Connexion vers noedler.de|193.33.21.198|:80... connecté.
requête HTTP transmise, en attente de la réponse... 200 OK
Longueur: 109315 (107K) [application/x-gzip]
Sauvegarde en : «wdfs-1.4.2.tar.gz»

100%[=======================================================================================================================================>] 109 315      500K/s   ds 0,2s

2012-02-23 11:29:06 (500 KB/s) - «wdfs-1.4.2.tar.gz» sauvegardé [109315/109315]

wdfs-1.4.2/
wdfs-1.4.2/README
wdfs-1.4.2/configure.ac
wdfs-1.4.2/aclocal.m4
wdfs-1.4.2/Makefile.am
wdfs-1.4.2/Makefile.in
wdfs-1.4.2/configure
wdfs-1.4.2/AUTHORS
wdfs-1.4.2/COPYING
wdfs-1.4.2/ChangeLog
wdfs-1.4.2/INSTALL
wdfs-1.4.2/NEWS
wdfs-1.4.2/TODO
wdfs-1.4.2/depcomp
wdfs-1.4.2/install-sh
wdfs-1.4.2/missing
wdfs-1.4.2/src/
wdfs-1.4.2/src/Makefile.am
wdfs-1.4.2/src/Makefile.in
wdfs-1.4.2/src/config.h.in
wdfs-1.4.2/src/cache.c
wdfs-1.4.2/src/cache.h
wdfs-1.4.2/src/svn.c
wdfs-1.4.2/src/svn.h
wdfs-1.4.2/src/wdfs-main.c
wdfs-1.4.2/src/wdfs-main.h
wdfs-1.4.2/src/webdav.c
wdfs-1.4.2/src/webdav.h
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for strndup... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for WDFS... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/config.h
config.status: executing depfiles commands
Making all in src
make[1]: entrant dans le répertoire « /root/wdfs-1.4.2/src »
make  all-am
make[2]: entrant dans le répertoire « /root/wdfs-1.4.2/src »
if gcc -DHAVE_CONFIG_H -I. -I. -I.     -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DNE_LFS -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/fuse -I/usr/include/neon   -Wall -D_GNU_SOURCE -D_REENTRANT -MT cache.o -MD -MP -MF ".deps/cache.Tpo" -c -o cache.o cache.c; \
        then mv -f ".deps/cache.Tpo" ".deps/cache.Po"; else rm -f ".deps/cache.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.     -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DNE_LFS -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/fuse -I/usr/include/neon   -Wall -D_GNU_SOURCE -D_REENTRANT -MT svn.o -MD -MP -MF ".deps/svn.Tpo" -c -o svn.o svn.c; \
        then mv -f ".deps/svn.Tpo" ".deps/svn.Po"; else rm -f ".deps/svn.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.     -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DNE_LFS -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/fuse -I/usr/include/neon   -Wall -D_GNU_SOURCE -D_REENTRANT -MT wdfs-main.o -MD -MP -MF ".deps/wdfs-main.Tpo" -c -o wdfs-main.o wdfs-main.c; \
        then mv -f ".deps/wdfs-main.Tpo" ".deps/wdfs-main.Po"; else rm -f ".deps/wdfs-main.Tpo"; exit 1; fi
wdfs-main.c: In function ‘wdfs_open’:
wdfs-main.c:700:2: attention : the address of ‘fi’ will always evaluate as ‘true’ [-Waddress]
wdfs-main.c: In function ‘wdfs_read’:
wdfs-main.c:766:2: attention : the address of ‘fi’ will always evaluate as ‘true’ [-Waddress]
wdfs-main.c: In function ‘wdfs_write’:
wdfs-main.c:788:2: attention : the address of ‘fi’ will always evaluate as ‘true’ [-Waddress]
wdfs-main.c: In function ‘wdfs_ftruncate’:
wdfs-main.c:964:2: attention : the address of ‘fi’ will always evaluate as ‘true’ [-Waddress]
if gcc -DHAVE_CONFIG_H -I. -I. -I.     -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DNE_LFS -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/fuse -I/usr/include/neon   -Wall -D_GNU_SOURCE -D_REENTRANT -MT webdav.o -MD -MP -MF ".deps/webdav.Tpo" -c -o webdav.o webdav.c; \
        then mv -f ".deps/webdav.Tpo" ".deps/webdav.Po"; else rm -f ".deps/webdav.Tpo"; exit 1; fi
gcc  -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DNE_LFS -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/fuse -I/usr/include/neon   -Wall -D_GNU_SOURCE -D_REENTRANT   -o wdfs  cache.o svn.o wdfs-main.o webdav.o  -pthread -lfuse -lrt -ldl -lneon -lglib-2.0
/usr/lib/gcc/i686-linux-gnu/4.6.1/../../../../lib/libneon.so: undefined reference to `SSLv2_server_method'
collect2: ld a retourné 1 code d'état d'exécution
make[2]: *** [wdfs] Erreur 1
make[2]: quittant le répertoire « /root/wdfs-1.4.2/src »
make[1]: *** [all] Erreur 2
make[1]: quittant le répertoire « /root/wdfs-1.4.2/src »
make: *** [all-recursive] Erreur 1
root@z-push:~#

ça vous est arrivé ?


Config : Acer swift 3 : Archlinux Ryzen 5 , 16G DDR4, NVME 250G

Hors ligne

#8 Le 23/02/2012, à 11:51

ftarkin

Re : [Script] Client Hubic pour linux ;)

Oui, il faut installer libneon27-gnutls-dev pour contourner le probleme... (j'y ai eu recours en reponse ici au 15e message)


Ordi perso monté en Core i3, 4 Go RAM Voyager 12.04 64
Dell Latitude E6210 (Core i3, 6 Go DDR3) Voyager 12.04 64
HP Z800 (biproc Xeon QuadCore 18 Go DDR3) Voyager 12.04 64

Hors ligne

#9 Le 23/02/2012, à 17:19

aliogan

Re : [Script] Client Hubic pour linux ;)

Bonjour.

D'abord, merci pour ce petit script qui me facilite la vie. Il marche super pour moi.
Toutefois, j'aurais voulu savoir si quelqu'un avais une idée pour garder les fichiers en locale, car je ne suis pas sur le net a 100%.
l'idée serais bien sur d'avoir un truc propre a la dropbox.

Edit: Je sait que ce n'est meme pas possible pour le client officiel sous windows, mais je me dis que c'est surement plus simple a bidouiller que sous windows.

Dernière modification par aliogan (Le 23/02/2012, à 17:21)

Hors ligne

#10 Le 23/02/2012, à 17:26

ftarkin

Re : [Script] Client Hubic pour linux ;)

Ben faut faire en fait du Rsync avec un dossier local, donc avoir une copie locale et une copie on the web... C'est ce que propose Cosmobob si j'ai bien suivi


Ordi perso monté en Core i3, 4 Go RAM Voyager 12.04 64
Dell Latitude E6210 (Core i3, 6 Go DDR3) Voyager 12.04 64
HP Z800 (biproc Xeon QuadCore 18 Go DDR3) Voyager 12.04 64

Hors ligne

#11 Le 25/02/2012, à 17:01

Tomzz

Re : [Script] Client Hubic pour linux ;)

Bonjour,
Je marque le sujet et histoire de ne pas le faire inutilement pour les malheureux windosien qui voudraient avoir une copie locale d'hubic, regardez du coté de Cobian backup (Open source jusqu’à la version 8) ou Always Sync (proprio mais gratuit pour la version limitée, je sais, célemal mais il était sympa à utiliser ce soft)

Dernière modification par Tomzz (Le 25/02/2012, à 17:01)

Hors ligne

#12 Le 27/02/2012, à 11:35

ftarkin

Re : [Script] Client Hubic pour linux ;)

Heu...

Sur ma deuxieme machine, j'ai un truc du genre

d?????????  ? ?       ?          ?                ? hubic

comme résultat du 'ls -l' pour mon montage, sans avoir d'accès aux fichiers dedans...

Et j'ai fait pareil qu'avant

Une idée ? Pb de webdav ?


Ordi perso monté en Core i3, 4 Go RAM Voyager 12.04 64
Dell Latitude E6210 (Core i3, 6 Go DDR3) Voyager 12.04 64
HP Z800 (biproc Xeon QuadCore 18 Go DDR3) Voyager 12.04 64

Hors ligne

#13 Le 27/02/2012, à 15:48

cosmobob

Re : [Script] Client Hubic pour linux ;)

salut, a priori je dirais qu'il s'agit d'un problème wdfs smile
fais un hubicmount avec l'option verbose (-v); puis regarde avec sudo mount.davfs si tu as un pb

Hors ligne

#14 Le 27/02/2012, à 15:53

ftarkin

Re : [Script] Client Hubic pour linux ;)

Au temps pour moi c'est l'option "-o uid=1000 " qui faisait le bug, mon uid n'est pas celle la....


Ordi perso monté en Core i3, 4 Go RAM Voyager 12.04 64
Dell Latitude E6210 (Core i3, 6 Go DDR3) Voyager 12.04 64
HP Z800 (biproc Xeon QuadCore 18 Go DDR3) Voyager 12.04 64

Hors ligne

#15 Le 02/03/2012, à 11:03

rangzen

Re : [Script] Client Hubic pour linux ;)

Super !
Par contre le pass est dans le .bash_history

Hors ligne

#16 Le 02/03/2012, à 12:30

ftarkin

Re : [Script] Client Hubic pour linux ;)

Ben tu fais un

chmod 600 .bash*

et seul toi peux le lire


Ordi perso monté en Core i3, 4 Go RAM Voyager 12.04 64
Dell Latitude E6210 (Core i3, 6 Go DDR3) Voyager 12.04 64
HP Z800 (biproc Xeon QuadCore 18 Go DDR3) Voyager 12.04 64

Hors ligne

#17 Le 02/03/2012, à 13:56

rangzen

Re : [Script] Client Hubic pour linux ;)

Je commence à peine à faire confiance à Gnome Key Ring alors le 600 ...
Je vais bidouiller le script. Sûrement la version python d'ailleurs, la version shell est un peu trop cryptique à mon goût, ça permet pas de jeter un coup d’œil rapide au code pour détecter un truc louche.

Sinon avec

sudo mv hubicmount /usr/bin

on peut virer la recherche locale

./hubicmount

devient

hubimount

Hors ligne

#18 Le 02/03/2012, à 13:59

ftarkin

Re : [Script] Client Hubic pour linux ;)

Au pire y'a aussi le cryptage de la partition... Mais toujours le probleme de keyring...

Sinon, change le script pour qu'il te demande ton pass au login meme avec un raccourci ?


Ordi perso monté en Core i3, 4 Go RAM Voyager 12.04 64
Dell Latitude E6210 (Core i3, 6 Go DDR3) Voyager 12.04 64
HP Z800 (biproc Xeon QuadCore 18 Go DDR3) Voyager 12.04 64

Hors ligne

#19 Le 02/03/2012, à 16:00

rangzen

Re : [Script] Client Hubic pour linux ;)

Hors ligne

#20 Le 07/03/2012, à 18:14

Compte anonymisé

Re : [Script] Client Hubic pour linux ;)

Pour info: hubiC-browser-0.3.5.tar.gz
Nécessite Qt 4.8.

#21 Le 08/03/2012, à 09:14

hackman61

Re : [Script] Client Hubic pour linux ;)

J'ai pas testé ce client beta, le probleme étant que mon utilisation d'hubic est sur des serveurs, donc pas d'UI... En tout cas merci beaucoup Cosmobob pour ton scipt, ça me sauve la vie smile


Config : Acer swift 3 : Archlinux Ryzen 5 , 16G DDR4, NVME 250G

Hors ligne

#22 Le 22/03/2012, à 23:21

ZgaR

Re : [Script] Client Hubic pour linux ;)

Le script marche bien pour copier des petits fichiers ou lire des données. Mais quand je tente de copier un fichier de plusieurs giga, depuis un serveur (donc à un débit moyen de 80MB/s) wdfs semble planter (grosse utilisation CPU) et le serveur ne répond plus, je suis obliger de killer wdfs pour récupérer la main.

Avez vous une idée d'une solution pour contourner ce genre de limitation ?

Hors ligne

#23 Le 12/06/2012, à 15:35

cmarcx

Re : [Script] Client Hubic pour linux ;)

Hello,

pour ma part tout fonctionne bien sauf le timestamp qui n'est pas préservé lors des copies.

J'ai essayé la commande rsync avec flag -t et --times mais rien n'a faire, le timestamp sur hubic est définit sur l'heure de copie et non l'heure originale du fichier sur le serveur!
Quelqu'un aurait une idée??

Dernière modification par cmarcx (Le 12/06/2012, à 15:36)

Hors ligne

#24 Le 13/06/2012, à 19:19

you75

Re : [Script] Client Hubic pour linux ;)

hello, je me suis inscrit chez HUbic depuis 4/5 jours et je n'ai toujours pas reçu mes 25Go... vous pensez que c'est normal ?

Hors ligne

#25 Le 17/06/2012, à 16:58

Jarodd

Re : [Script] Client Hubic pour linux ;)

Bonjour,

J'ai essayé de monter hubic avec la commande : ./hubicmount -l <email> -p <passwd> -o umask=022 -o uid=1000 /media/hubic

Mais j'obtiens toujours l'erreur "Unable to login to hubic". Pourtant les logins indiqués sont bons, je fais un copier-coller, et ils fonctionnent avec le client d'Hubic... Je dois changer quelque chose ?

Dernière modification par Jarodd (Le 17/06/2012, à 16:58)


Ubuntu 22.04.3 LTS (64 bits)

Hors ligne