Looking to make a backup script and a simple restore script.
I want to store the backup target from a file I pull from in a tar archeiver - so compress the tar file using a compression utility which was specified in the config file and put into a variable.
-Also want backups to be named hostname.backupname.date.time.tar.gz (or bz, bz2, etc.)
-backupname (matches the backupname in the config file)
-date (date in YYYY-MM-DD format)
-time (time in HH:MM 24 hour format)
I think you can find switches to the date command that would be eaiest.
The backups should be placed in the target directory as found in the config file as a variable ( i have already wrote stuff to pull that out) But the script needs to create any non-existent directories
- the script needs to create a new log file in /var/log/backup each time the script executes. The file should be named backupname.date.time with parameters same as the backup file name. The log should contain the date and time as well as a list of files backed up (this could be done using the ls with flags to generate the list of files)
Write a restore script that restores the contents of a backup to the system
o The restore script should be called from the machine to be restored with the name of the backup file as a parameter
o The script should ask the user to verify the operation then restore the files
Overwriting any existing files
Any help would be awesome bits and peices blessful as well. I am just trying to hammer away at this and causing more harm than good.
Honestly, this really sounds like homework.....
That I do not deny. Just looking for help.
So then please post what you have so far, then ask questions. We will not do your homework for you.
This is a test file I made from an earlier program.
Then this is a backup script I have been working on. It pulls from from the test file (backup.conf) ^ and makes variables...this is where i got stuck.
I don't know what is wrong with your variables, but backing up script you can look at here
|All times are GMT -5. The time now is 05:52 AM.|