Table of Contents

How to use rsync for very populated directory

On limited devices rsync gets out of RAM while crawling the FileSystem, so I decided to script this and to transfer each directory individually and exclude successfully transferred on second pass.

But 1st I needed to know how to copy a single dir without changing the argument of destitation (ie: not /src/subdir to /dest/subdir , just copy subdir from /src/ to /dest/)

And ended with this solution:

    dir="/tmp/$0.dir/base"
    src="$dir/src"
    dst="$dir/dst"
 
    rm -rfv "$dir"
    mkdir -p "$src" "$dst"
    cd "$dir" 
    pwd
    mkdir -p dir/subdir
    touch dir/subdir/file
    mkdir -p tmp
    mkdir -p dir/ignored-1
    mkdir -p dir/ignored-2
    mkdir -p dir/ignored-3
    mkdir -p dir/ignored-4
 
    dir="dir/subdir"
 
    filters=()
    d="$dir"
    while [ "." != "$d" ] ; do
        filters+=(--filter '+ '$d'/')
        d=$(dirname -- "$d")
    done
    IFS=$'\n'; 
 
    success="$dir/done.lst"
    touch "$success"
 
    sudo rsync \
        --verbose \
        -aAvxXm \
        --exclude-from "$success" \
        --filter "+ $dir/**" \
        "${filters[@]}" \
        --filter '- *' \
        "./" "$dst/" \
        && echo "$dir" | tee -a "$success"
 
    find "$dst"
 
    sudo rsync \
        --verbose \
        -aAvxXm \
        --exclude-from="$success" \
        --filter "+ $dir/**" \
        "${filters[@]}" \
        --filter '- *' \
        "./" "$dst/" \
        && echo "$dir" | tee -a "$success"
 
 
    rm -rf "$dir"

MeeGo

I rebuilt this neat rsync tool for my HandSet … I planned to publish it on ovi store too but I miss a gui, so i created a basic qt using python … but It is not over anyway the package freely installable from shared repo …

NEWS

OpenSource :

TopStream: http://rsync.samba.org/# VC: http://gitweb.samba.org/?p=rsync.git

UpStream: http://packages.qa.debian.org/r/rsync.html

DownStream: https://gitorious.org/downstream/rsync

FeedBack :

http://talk.maemo.org/showthread.php?t=79636

http://forum.meego.com/showthread.php?p=34724#post34724

DownLoad :

Just open this file on your device browser's :

http://repo.pub.meego.com/home:/rzr:/harmattan/MeeGo_1.2_Harmattan_Maemo.org_MeeGo_1.2_Harmattan_standard/armel/rsync_3.0.9-1ubuntu1.0~rzr1_armel.deb

Or updated one at :

http://repo.pub.meego.com/home:/rzr:/harmattan/MeeGo_1.2_Harmattan_Maemo.org_MeeGo_1.2_Harmattan_standard/armel/# rsync_3.0.9-1.0~rzr1_armel.deb

Using ApT see http://rzr.online.fr/q/harmattan

upcoming ovistore : http://store.ovi.com/content/265132#

Status :

https://build.pub.meego.com/package/show?package=rsync&project=home%3Arzr%3Aharmattan

MISC

MORE

@tag: BackUp SsH SynC HarmattaN CygWin MaeMo

images.icanhascheezburger.com_completestore_2008_8_28_rsynccopy128644159665673454.jpg

www.funnyhumorclips.net_pictures_uploads_10_funny-and-wtf-pictures-part-2_5.jpg