Site Sponsors:
Linux: Quick & Easy Backup 
The default way of backing-up files on Linux has left many a new 'sysadmin needing to restore file dates and times. The problem only becomes worse when several sources are to be backed-up.

Here is a little ditty I use when backing-up multiple directories to POSIX-aware (ctime, mtime, atime) file systems:

#! /bin/bash
mkdir -p "./logs"
#EXAMPLE: How to perform any temp-file cleanup
#find "/d_drive/USR/code/" -type f -name "*.class" -exec rm "{}" ";"
zdate=`date +%j@%H_%M_%S`
echo "$zdate"
date > "./logs/nsync.$zdate"
for arg in "/a_drive" "/b_drive" "/c_drive"
cp -r -u -v --preserve $arg "./" >> "./logs/nsync.$zdate"
date >> "./logs/nsync.$zdate"

To use the above, simply:

(1) Copy and paste the above script into a file.

(2) Replace the *_drive folders with a full pathing to whatever rooted folders you want to back up.

(3) Place the script-file wherever you want your set of folders copied.

(4) Add the executable bit (chmod +x or otherwise mark the file as executable in Nautilus (etc.)).

(5) Run the results.

Details over what has been backed-up will be placed into the ./logs directory.



Note: If your are using a file system that does *NOT* support /usr/group (POSIX) attributes, then using `tar` as described here can also save the day(s).

Before any backup strategy however, don't forget to watch for, as well as kill those Zombies!

[ view entry ] ( 1555 views )   |  permalink  |  related link

<<First <Back | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | Next> Last>>