Copy latest files from linux to network drive
I have a linux server running an accounting package, I would like copy any files from that data directory that were altered each day to a network drive so it can be included in our backups.
Currently I am manually doing this each day by copy/paste between the directories. As I will be away from the business over christmas I need an icon staff can click on as they leave the office each day to run a script to do this. I have extremely basic knowledge of any linux commands and my attempts to build a suitable script have so far failed completely. The data drive path is: /u/pp/data The target directory is svr-sbs1210/data/finance/share linux/copy/data Any help would be fantastic, due to the size of the information I'd prefer to only copy file that changed the day the script is run rather than copy all files every day if possible. |
I suggest using rsync run as a cron job. e.g. http://www.marksanborn.net/howto/use...nthly-backups/
|
How's about...
Quote:
Quote:
Test out the rsync command any time. Then you need to do a bit of digging regarding crontab to schedule the job to run every night - no need for manual intervention. Quote:
HTH |
Quote:
Code:
rsync -av /u/pp/data svr-sbs1210/data/finance/share linux/copy/data In any case, I agree rsync is a good solution for the original poster. SAM |
Quote:
Quote:
|
i see there is a space in the directory name so it probably needs to be quoted (or escaped):
rsync -av /u/pp/data "svr-sbs1210/data/finance/share linux/copy/data" - or - rsync -av /u/pp/data svr-sbs1210/data/finance/share\ linux/copy/data also if this goes in cron then it will need to know the full path of where the svr-sbs1210 subdirectory is located. |
All times are GMT -5. The time now is 10:38 AM. |