LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 01-12-2007, 09:19 PM   #1
neville310
LQ Newbie
 
Registered: Oct 2005
Posts: 17

Rep: Reputation: 0
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.
 
Old 01-13-2007, 05:30 AM   #2
jpk
Member
 
Registered: Apr 2006
Location: Copenhagen, Denmark
Distribution: FC5->Ubuntu 6.10->Ubuntu 7.04->Ubuntu 7.10->Ubuntu 8.04
Posts: 39

Rep: Reputation: 16
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
 
  


Reply

Tags
backup, rsync, script


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using a usb thumb drive or flash drive as a swap partition. stevenjoseph Linux - Hardware 8 01-16-2012 12:09 PM
USB Pen Drive / Flash Drive Unmounted but the power is there teluguswan Linux - Hardware 11 10-04-2008 03:36 PM
USB flash drive (Pen drive) mounts read only prabhatsoni Linux - Hardware 24 07-02-2007 01:28 PM
copying files from my home directory to my USB Flash Disk neo_phyte Red Hat 9 04-24-2006 12:32 AM
using flash drive for /home directory? tuneout Debian 3 01-01-2006 07:22 AM


All times are GMT -5. The time now is 06:49 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration