help with modifying a backup script
hi all,
i have a backup script i aquired from somewhere (credit where credit is due). i would like to modify it a little.What it does is backs up daily (/etc/cron.daily) what ever directories you enter into it. e.g. BACKUPTHESE="/home /root/" it backs up to directories i have created. e.g on a monday it backsup everything inside /home & /root and places it in /media/other/backup/daily.On Tuesday it first moves everything from /dailt into /yesterday an so on. (see the script below) Code:
#!/bin/bash Or any other ideas on a better setup. Thanks |
bump
anyone got any ideas |
hello. what's BACKUPTHIS in 'cd $BACKUPTHIS || exiterror $LINENO'?
|
i'm not really sure it looks like it just checks if it changed directory alright.
e.g. if you didn't create the directory your changing to, maybe? The script works great though. |
Code:
#!/bin/sh The names of the tar.gz files let you know where they come from. The script also removes the oldest backup: if you want to give it a try, make sure to create /path/to/backup/dir/20060926 and newer dummy backup directories before running it. An advice: NEVER run a script if you do not understand each line of it. Bye! |
Quote:
|
Quote:
|
Quote:
Quote:
But i here the warning ;) |
What do you prefer to identify the folders, tags or directories?
|
not quite sure of the difference, but i would imagine that it would not really bother me either way.
|
please find a way to test this mod. if you don't like each pair to be separated in a different directory just tell me.
Code:
#!/bin/bash |
o.k gave it a go but i get errors.Not sure what this means (see below)
Code:
root@server:~# sh backup |
Text format error. Sorry about that. I tested the code myself and made new changes. Please try again.
Code:
#!/bin/bash |
Works great, thanks for spending the time to do that it's much appreciated :D
is there a simple thing i can change to make the script verbose.Not a big issue just wondering. Also any ideas on the best way to restore these backup's if failure did happen to occur. Once again thanks for the script (much appreciated) Dean |
added verbosity (script.sh -v)
Code:
#!/bin/bash |
All times are GMT -5. The time now is 11:01 AM. |