Results 1 to 3 of 3
Hi,
I have little experience in Linux, so I ask for help.
I need a script to do:
1 .- Compress (zip) entire directories (subdirectories-files) to a folder that is ...
- 04-22-2011 #1Just Joined!
- Join Date
- Nov 2008
- Posts
- 4
I need support in script
Hi,
I have little experience in Linux, so I ask for help.
I need a script to do:
1 .- Compress (zip) entire directories (subdirectories-files) to a folder that is /backup. The directory is called /work
2 .- Rename the zip file with the name /backup/backupdir_% date%. zip
3 .- Make a MySQL dump and compress as /backup/mysql_% date%. zip
4 .- Make a put to a public FTP.
5.- Delete all files of /backup/
Explanation: the second time running the point 1 must only compress those files or directories that are updated.
Thanks
OS RedHat 5.3 x64
- 04-24-2011 #2
What have you got so far? I would suggest using the tar command for the backup, with the --incremental-listed option to create your backup files. See the tar manpage for more information on the options that are available. It will create a tar.ga file, not a zip file.
You will need to stop mysql before backing it up,Code:tar czf /backup/backup-$(date %Y%m%d).tar.gz --listed-incremental /work
Not sure what scripting language you want to use, but if using bash or equivalent, you can just use the FTP command to push the files to the remote server.Code:service mysql stop
- 04-24-2011 #3Just Joined!
- Join Date
- Nov 2008
- Posts
- 4
Hi!!
I perform scripts in Windows but I've never worked in linux with it. As serious as the script and I running it?
Thanks


Reply With Quote