MYHREN.ORG

Move along, there is nothing to see
  • Home
  • About me
    • Curriculum Vitae
  • My travels
    • Vanuatu
    • Hong Kong
    • Fisketur i Rogen
  • Technical stuff
    • Networkmanager and openvpn
    • About this site
    • Nifty linux commands
    • Installere UTorrent
  • Guestbook
  • Photos
    • Australia
    • Helena
    • My photos
      • Fisketur i Rogen

Using rsync to update a samba share from windows

February 5, 2009

I have used this technique to migrate a windows fileserver to a ubuntu samba server.  Rsync is a brilliant tool that uses a delta-algorithm to transfer files. This makes it easy to keep folders synchronized across networks.

First I mounted the the windows share on my linux box using this command. Note the iocharset and codepage. These are to keep my Norwegian characters normal :)

mount -t cifs  //winserv/share /mount_dir -o username=johndoe,password=blabla,iocharset=utf8,codepage=cp850

Then, I used rsync to copy them into the new folders. Note the exclude, this is because /exports is a NetApp file system mounted via NFS, and I don’t want to include these backup dir’s into them mess.

rsync --verbose  --progress --stats --recursive --times --perms --links --delete --exclude '.snapshot' /source_dir /dest_dir

Voila!

Ps. Add the option –dry-run to have  a preview of what’s to come.

Categories
Technolgy
Comments rss
Comments rss
Trackback
Trackback

« Find & copy Vi har kjøpt nytt hus! »

Leave a Reply

Click here to cancel reply.

Pages

  • About me
    • Curriculum Vitae
  • Guestbook
  • My travels
    • Fisketur i Rogen
    • Hong Kong
    • Vanuatu
  • Photos
    • Australia
    • Helena
    • My photos
      • Fisketur i Rogen
  • Technical stuff
    • About this site
    • Installere UTorrent
    • Networkmanager and openvpn
    • Nifty linux commands

Gallery

                                                                                             Star ferries

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

Spam Blocked

46,817 spam comments
blocked by
Akismet
rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox