Reply
Thread Tools
Posts: 86 | Thanked: 24 times | Joined on Jan 2008
#1
I overclock and use a number of applications in extras-devel and extras-testing, so I've started keeping a making full backups of the root directory to an external card. The beauty is that the initial backup takes a while; however, subsequent updates may take only minutes.

To use rsync you'll need a little prep:

- Card partiion must be formatted for Linux. I use ext3. (I have an ext3 and a vfat partition on my card.)
- Card partition must be large enough to contain all the directories. The Storage Usage app (in maemo-extras) is helpful in figguring out how much space you'll need. I also use 'du' as in 'du -sh /home' to determine directory size, and I use 'df -h'; however, the partitioning scheme makes this less useful.
- You'll need rsync (in maemo-extras)

This is the command I use:

Code:
rsync --delete --recursive \
    --times --perms --links \
    --verbose --progress --stats  \
    --exclude "/dev/" \
    --exclude "/media/" \
    --exclude "/proc/" \
    --exclude "/sys/" \
    --exclude "/tmp/" \
    / /media/mmc2/backup/full/
--delete: Delete files on target that are deleted on the source
--recursive: Recurse into directories
--times: Maintain modification times
--perms: Maintain permissions
--links: Copy symlinks as symlinks
--verbose: Provide verbose output
--progress: Show progress
--stats: Provide stats after run
--exclude: Pattern to exclude.

If the pattern has a leading slash, the pattern will be used to match a root directory. File patterns are O.K.,( such as --exclude "*.mp3"). By default, rsync doesn't copy special files; however, it seems a good idea to exclude dev, proc and sys. You should exclude '/media/' as this is where your target will be.

The last line specifies the source and target for the backup.

You'll need to customize for your use. Depending on the size of what you're backing up, the first run will likely take hours. After that, runs will likely take minutes if no major file additions have been made. All setup and initial run is easiest done via SSH.

You can, of course, use fcron to run this as a cron job. If so, you'll likely want to eliminate the '--verbose', '--progress', and '--stats' switches.

Last edited by burmashave; 2011-01-15 at 22:56.
 

The Following User Says Thank You to burmashave For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 13:33.