-   Slackware (
-   -   backup directories to move from Slack 12 to Slack 12.1 (

linuxhippy 11-10-2008 11:12 PM

backup directories to move from Slack 12 to Slack 12.1
I want to backup some directories holding mp3 files from my first pc running Slack 12 to an external backup drive to transfer them to another pc running Slack 12.1. All of these directories to be copied already exist on my backup drive but some of these have changed. I want to replace the changed directories on my first pc to my backup drive. How could this be done with a script?

T3slider 11-10-2008 11:33 PM

The easy way would be to just use rsync to get everything up to date (see `man rsync`). That isn't exactly what you asked, but it basically accomplishes the same thing. Depending on the options you pass, it will copy over any new files that are not on your backup drive and will overwrite any updated files (based on the filesize or modification time). If you're worried about keeping the originals, rsync can also copy over the new, updated files while renaming the old files to prevent them from being overwritten (see the -b, ie --backup option). If you have files on your backup drive that are no longer present on your PC that you don't want deleted, make sure to NOT use the --delete option, which would delete any files on the backup drive that are not on the PC.

All times are GMT -5. The time now is 07:32 AM.