LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (http://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Syncing your home directory on a USB Flash Drive (http://www.linuxquestions.org/questions/linux-desktop-74/syncing-your-home-directory-on-a-usb-flash-drive-518824/)

neville310 01-12-2007 09:19 PM

Syncing your home directory on a USB Flash Drive
 
Could someone give me suggestions or a guide on syncing data from a Linux box to a USB flash drive, ftp, or ntfs partition? I want a tool to backup my home directory in multiple locations especially for my development files. My search found rsync, yet I am hoping for more information on the best approach or creating a specific sync script. Thanks in advance.

jpk 01-13-2007 05:30 AM

a simple rsync'ing script
 
Hi!
I've been using rsync to do my backups for a while, since it is very easy and fast. Hope you can get some ideas from my backup script:

Code:

#!/bin/sh       
                                                                                           
# rsync options:                                                                                         
#  transfer files (t),                                                                                       
#  recurse directories(r)                                                                                   
#  work verboraly (v),                                                                                       
#  delete files on receiving site, if they not exist on sending site (-delete)                               
#  show progress (P)                                                                                         
#  compress during file transfer (z)   
#  max difference in time stamps is 2 sec (modify-window)                                                                 
#  safe links (as files when another file system / mount point)
RSYNC_OPT="-zrtv --delete --modify-window=2 --safe-links"

# source folder (where all my files that require backup are placed)
LOCAL_SCR=/mnt/shared/

# remote folder (where my external usb-hdd is mounted prior to backup)
REMOTE_DST=/mnt/backup/

# run the program ;)
rsync $RSYNC_OPT $LOCAL_SCR $REMOTE_DST

As I use ext2fs at both sync-points, I don't care about the sym-links. I think, they are just omitted, when your destination is a fatfs, and file ownership data is not transferred either.

Sincerely,
Jarik


All times are GMT -5. The time now is 08:47 AM.