Daten vom FTP Server regelmässig laden

  • Hallo,


    ich möchte 1x am Tag Daten von einem FTP Server auf meinen OMV-Server
    laden. Lässt sich das per Cronjob machen?


    Gruss

    Server:
    BitFenix Phenom M - ASRock B75 Pro3-M - 8GB Crucial B.S. - Intel G2140 - Corsair CX430M - 1x 64GB SanDisk SDSSDP (system) - 2x 2TB WD20EARX (data) - 1x 3TB WD30EFRX (Snapraid) - TBS6981 DVB-S2 - OMV 0.5x

  • Ist der FTP Server und dein NAS dauerhaft an? Dann einfach ftpfs/curlftps nutzen, und das kopieren der dateien in nen script packen welches du per Cronjob laufen lässt:


    http://wiki.ubuntuusers.de/curlftpfs


    Ist dein NAS nicht dauerhaft an musst du das Kapitel mit der FSTAB durcharbeiten. Es empfiehlt sich ausdrücklich für die speicherung von User/Passwort netrc zu verwenden wie im o.g. Artikel beschrieben!


    Gruß
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • Danke.... Mit etwas fummeln läuft es nun, curlftps hat mich schliesslich zu sshfs geführt, da nur sftp geht.


    Habe mir erstmal 3 Cronjobs angelegt, da ich das nicht mit einem Script hinbekommen habe.


    Cronjob 1: Mounte sftp Laufwerk

    Code
    echo MEIN_PASSWORT | sshfs -o password_stdin root@192.168.1.77:/ /mnt/meteo


    Cronjob 2: Backup Ordner "home"

    Code
    tar -cf /media/422dadde-c327-4fd2-9ead-bd2227600123/Dokumente/Meteo/home-`date "+%F"`.tar /mnt/meteo/home


    Cronjob 3: Backup Ordner "data"

    Code
    tar -cf /media/422dadde-c327-4fd2-9ead-bd2227600123/Dokumente/Meteo/data-`date "+%F"`.tar /mnt/meteo/data


    Per Cronjob geht so, komischerweise nicht per Script

    Server:
    BitFenix Phenom M - ASRock B75 Pro3-M - 8GB Crucial B.S. - Intel G2140 - Corsair CX430M - 1x 64GB SanDisk SDSSDP (system) - 2x 2TB WD20EARX (data) - 1x 3TB WD30EFRX (Snapraid) - TBS6981 DVB-S2 - OMV 0.5x

  • Ich sehe zwar nicht wo das Problem liegt das alles in einen Cronjob zu packen, was vorallem sicher stellt dass das Backup erst startet sobald die Verbindung aufgebaut wurde. Ich empfehle dir aber die Authentifizierung auf Public-Keys umzustellen, so im Klartext ein Passwort in eine Systemdatei eintragen die jeder mit Zugriff auf das System lesen kann ist nicht wirklich sicher.


    Siehe: http://wiki.ubuntuusers.de/FUSE/sshfs bzw. http://wiki.ubuntuusers.de/SSH…zierung-ueber-Public-Keys


    Or a solution inbetween:



    Code
    sshfs -o credentials=$HOME/.credentials your-ssh-username@your-web-host.com:remote-directory ~/.remote-secure-volume


    Zitat

    In /etc/fstab, your line will look like


    Code
    sshfs#user@server.domain.com:/<your default dir> <mount point> fuse credentials=<path to .credentials>.credentials 0 0


    Zitat

    (you cannot use the $HOME variable, but you need to spell out the full path yourself).


    I am not sure about the "encrypt" part: probably you will need to issue this command manually before the transaction, or have it placed in a script.


    Source: http://ubuntuforums.org/showth…147&p=5244629#post5244629


    °_° :roll: Jetzt verfall ich schon in einem Post von Deutsch ins englische.... grml... hoffe du verstehst das hier drunter trotzdem... :roll:


    Should be more secure than using the password in plaintext within a cron.


    So, add a credentials file and - either add the line to your fstab for permanent mount - or put it into a new backup script - which should simply look like like that:



    Script ist ungetestet, könnte also noch Syntaxfehler enthalten.


    Gruß
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • werde es probieren, danke. das ganze spielt sich eh nur im LAN ab....

    Server:
    BitFenix Phenom M - ASRock B75 Pro3-M - 8GB Crucial B.S. - Intel G2140 - Corsair CX430M - 1x 64GB SanDisk SDSSDP (system) - 2x 2TB WD20EARX (data) - 1x 3TB WD30EFRX (Snapraid) - TBS6981 DVB-S2 - OMV 0.5x

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!