update .. my newbie geek linux backup script is here what is wrong? Anyone like to help further? Maybe I can learn from it
PLEASE HELP! ;-)
update .. my newbie geek linux backup script is here what is wrong? Anyone like to help further? Maybe I can learn from it
PLEASE HELP! ;-)
You can for example check only sizes and time of the last modification for each file, this would be much quicker and probably fit your needs:
du -a –time $FOLDER1 > /tmp/folder1
du -a –time $FOLDER2 > /tmp/folder2
diff /tmp/folder1 /tmp/folder2
Maybe you can use rsync?
You can use rsynch to make the 2 directories the same if that is your goal..
rsync -av –delete /home/backup/ch3snas/ /home/backup/server/data
the –delete make sure the files that are deleted in the source are also deleted in the target so the target will not grow out of diskspace.
rsync has a lot more options ofcourse..
rsync itself for the purpose is too slow
my ‘script’ already works, but need to compare the target folder with the source if they are equal, if they are equal than the source files can be removed if not (due to failure in ftp) than the script must stop
FOLDER1=$’/home/backup/server/data’
FOLDER2=$’/home/backup/ch3snas/`date “+%d-%m-%y”`’
du -a .time $FOLDER1 > /tmp/folder1
du -a .time $FOLDER2 > /tmp/folder2
Compare=$(diff /tmp/folder1 /tmp/folder2)
FOLDER2 does not work as I want it. Folder2 has the date of today, and this folder must be compared, but the date command seems not to work as environment
Dennis,
Kan het mis hebben, maar mis je niet 1x else ????
In het begin 2x if then, naar na wat commando’s maar 1x else….
Je mist de else van if [ ! -n “$Compare” ]; then
of van if [ -e data ] then
volgens mij…
Hi Robbie, thanks for your answer
I have solved my issue by buying a script for bluequartz..
that was more easy than all the hassle I had to do myself programming