Shaare your links...
410 links
peacecoLiens Home Login RSS Feed ATOM Feed Tag cloud Picture wall Daily
Voir tous les commentaires(24)
Links per page: 20 50 100
page 1 / 1
3 results for tags ftp x
  • Mount remote ftp directory host locally into linux filesystem
    1. Installation

    First install curlftpfs package. On Debian or Ubuntu it would simple as:

    apt-get install curlftpfs

    2. Mount ftp directory

    What needs to be done next is to create a mount point:

    # mkdir /mnt/my_ftp

    next use curlftpfs to mount your remote ftp site. Suppose my access credentials are as follows:

       username: ftp-user
       password: ftp-pass
       host/IP: my-ftp-location.local

    the actual curlftpfs mount command would be:

    # curlftpfs ftp-user:
    ftp-pass@my-ftp-location.local /mnt/my_ftp/

    Caution:

    ftp uses unencrypted passwords so anyone can intercept your password without much effort. Therefore use curlftpfs in combination with SSL certificates if your are not mounting some local LAN ftp server.

    On Debian you can mount ftp using curlftpfs as a root and this allows only root user to access ftp mount. No other users are allowed since by default only users that mounts has and access to mount directory. When mounting ftp as a non-root user you may get a following error message:

    fuse: failed to open /dev/fuse: Permission denied

    Rather that changing permissions of /dev/fuse you can allow other users to access ftp mount directory with an curlftpfs's option allow_other. The command will look similar to the one below:

    # curlftpfs -o allow_other ftp-user:
    ftp-pass@my-ftp-location.local /mnt/my_ftp/

    3. Mount ftp with curlftpfs using /etc/fstab

    Since we do not want put any passwords to /etc/fstab file we will first create a /root/.netrc file with a ftp username and password using this format:

    machine my-ftp-location.local
    login ftp-user
    password ftp-pass

    Now change permissions of this file to 600:

    # chmod 600 /root/.netrc

    Check uid and gid of your non-root user. This user will have a access to ftp mount directory:

    $ id

    In the next step add a following line to your /etc/fstab file ( change credentials for your ftp user ):

    curlftpfs#my-ftp-location.local /mnt/my_ftp fuse allow_other,uid=1000,gid=1000,umask=0022 0 0

    Now mount ftp with:

    mount -a
    Thu 19 Sep 2013 09:19:29 PM UTC - permalink -
    - http://linuxconfig.org/mount-remote-ftp-directory-host-locally-into-linux-filesystem
    curlftpfs ftp

    Commentaires(0)













  • Effectuer vos sauvegardes avec Duply
    Effectuer vos sauvegardes avec Duply

    written on Monday, September 17, 2012

    Duply est un frontal pour l’outil Duplicity, il permet d’effectuer des backups incrémental vers des serveurs de type FTP, SFTP, IMAP, Amazon S3, etc …, les sauvegardes peuvent être cryptées.

    Création d’un profil

    duply nom_profil create

    Cette commande crée un profil dans le répertoire /root/.duply/nom_profil/

    Paramétrage du profil

    Nous allons modifier le profil qui comprendra 3 fichiers de configuration:

       conf: Configuration du profil
       exclude: Fichiers à exclure lors de la sauvegarde
       pre: Tâche à exécuter avant de débuter la sauvegarde

    Contenu du fichier conf

    GPG_PW='clef_a_definir'
    TARGET='ftp://ftp.cendreo.com/duply'
    TARGET_USER='user'
    TARGET_PASS='userpass'
    SOURCE='/'
    MAX_FULL_BACKUPS=2

    Contenu du fichier exclude

    /bin
    /boot
    /dev
    /lib
    /lost+found
    /media
    /mnt
    /opt
    /proc
    /sbin
    /srv
    /sys
    /tmp
    /usr
    /var
    /data/nobackup
    /lib64
    /run

    Contenu du fichier pre

    Le fichier pre est un lien symbolique sur un exécutable que l’on désire exécuter avant de lancer le backup. Nous utilisons ici le script jsl-mysqlbackup.sh qui permet d’effectuer les backups MySQL.

    Planification des sauvegardes

    avec la commande crontab -e nous allons ajouter les lignes suivantes pour effectuer une sauvegarde incrémentale en semaine et une complète le Samedi.

    0 3 * * 0-5 duply mon_profil backup_purge_status --force
    0 3 * * 6 duply nom_profil pre_full_purge-full_status --force

    Vérification des sauvegardes

    root@w1:~/.duply/mon_profil# duply mon_profil status
    Start duply v1.5.2.3, time is 2012-09-17 19:38:40.
    Using profile '/root/.duply/mon_profil'.
    Using installed duplicity version 0.6.08b, gpg 1.4.10 (Home: ~/.gnupg)
    Test - Encryption with passphrase (OK)
    Test - Decryption with passphrase(OK)
    Test - Compare Original w/ Decryption (OK)
    Cleanup - Delete '/tmp/duply.18426.1347503520_*'(OK)

    --- Start running command STATUS at 19:38:41.055 ---
    NcFTP version is 3.2.4
    Local and Remote metadata are synchronized, no sync needed.
    Last full backup date: Sat Sep 15 03:11:08 2012
    Collection Status
    -----------------
    Connecting with backend: FTPBackend
    Archive dir: /root/.cache/duplicity/duply_mon_profil

    Found 1 secondary backup chain.
    Secondary chain 1 of 1:
    -------------------------
    Chain start time: Sat Sep  8 03:10:59 2012
    Chain end time: Fri Sep 14 03:11:06 2012
    Number of contained backup sets: 7
    Total number of contained volumes: 1904
    Type of backup set:                            Time:      Num volumes:
    Full         Sat Sep  8 03:10:59 2012              1768
    Incremental         Sun Sep  9 03:10:49 2012                46
    Incremental         Mon Sep 10 03:12:05 2012                21
    Incremental         Tue Sep 11 03:11:11 2012                26
    Incremental         Wed Sep 12 03:11:04 2012                14
    Incremental         Thu Sep 13 03:11:04 2012                14
    Incremental         Fri Sep 14 03:11:06 2012                15
    -------------------------


    Found primary backup chain with matching signature chain:
    -------------------------
    Chain start time: Sat Sep 15 03:11:08 2012
    Chain end time: Mon Sep 17 03:12:16 2012
    Number of contained backup sets: 3
    Total number of contained volumes: 1866
    Type of backup set:                            Time:      Num volumes:
    Full         Sat Sep 15 03:11:08 2012              1795
    Incremental         Sun Sep 16 03:11:06 2012                47
    Incremental         Mon Sep 17 03:12:16 2012                24
    -------------------------
    No orphaned or incomplete backup sets found.
    --- Finished state OK at 19:38:43.006 - Runtime 00:00:01.950 ---

    Restauration # Restaure le dernier backup

    duply mon_profil restore /destination_dir

    # Restaure le backup effectué il y'a 4 jours

    duply mon_profil restore /destination_dir 4D

    # Restaure le dernier fichier rep/fichier

    duply mon_profil fetch rep/fichier /destination_dir

    # Restaure le fichier rep/fichier d'il y'a 4 jours

    duply mon_profil fetch rep/fichier /destination_dir 4D

    Note 1: Concernant la commande fetch, si vous désirez restaurer un fichier, le fichier de destination doit être également indiqué sinon le répertoire (si il est vide) sera remplacé par le fichier à restaurer. Note 2: Concernant la commande fetch, dans le cas d’un répertoire, le répertoire de destination doit être vide, sinon la restauration sera interrompu.

    Ce billet est taggé avec Anti-Virus, Linux and planet-libre
    Sat 14 Sep 2013 05:37:20 AM UTC - permalink -
    - http://blog.cendreo.com/2012/09/17/effectuer-vos-sauvegardes-avec-duply/
    duply sauvegarde duplicity ftp

    Commentaires(0)













  • Utiliser le module FTP de Python - Python
    une lib ftp pour pyton
    Thu 22 Nov 2012 01:56:04 PM UTC - permalink -
    - http://www.siteduzero.com/tutoriel-3-35822-utiliser-le-module-ftp-de-python.html
    ftp python projet script

    Commentaires(0)













Links per page: 20 50 100
page 1 / 1
Shaarli 0.0.40 beta - The personal, minimalist, super-fast, no-database delicious clone. By sebsauvage.net. Theme by idleman.fr.