Sync from ftp to webdav

  • Hi there,


    currently I am using duplicity to generate backups on a ftp storage. Now I would like to sync the new/changed/deleted files from the ftp backup space to my webdav cloud storage.


    (configuration: duplicity generates once a week a full backup and the days between incremental backups.)


    My question:
    Does anyone know a tool/programm which is able to copy from remote ftp to remote webdav - and has something like synchronisation functionality to only copy new files?



    Additional information:
    Currently I switched to duplicity using this plugin: https://github.com/zertrin/duplicity-backup - it is running very good at the moment.

    Edited once, last by UncleSam ().

  • Hi Unclesam,


    There are some things you could check out.
    http://techiech.blogspot.nl/20…v-directory-in-linux.html
    and
    https://linuxconfig.org/mount-…lly-into-linux-filesystem


    Then you can just copy files


    cp -r /mnt/webdav/path/to/files /mnt/ftp/path/to/files
    or you could make a bash script that does something like this:


    #!/bin/bash
    tar -czf /var/spool/backup-prepare/webdavbackup.tar.gz /mnt/webdav/path/to/files
    cp -r /var/spool/backup-prepare/webdavbackup.tar.gz /mnt/ftp/path/to/backup/dest
    rm /var/spool/backup-prepare/webdavbackup.tar.gz


    I have some back up scripts on GitHub, feel free to check it out: https://github.com/theemstra/BackupScripts
    I use it on my servers for system backups, it supports the rotation of backupfiles, so it numbers them from 1 to 20 (max amount you can configure) and then it removes the oldest one.


    Of course, if you want to sync only new files, you could consider rsyncing.