Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )

Advanced DNS Management
New ZoneEdit. New Managment.


Sign Up Now
Reply to this topicStart new topic
> Cron Jon Syntax?, Need help setting up a cron job to backup folder, append date.
post Feb 16 2011, 08:00 AM
Post #1

Whats this Lie-nix Thing?

Group: Members
Posts: 1
Joined: 16-February 11
Member No.: 15,076

Hi there, I'm looking for some help with some cron job syntax. If you can help, I appreciate your time!

First, I'm setting up a bunch of cron jobs using the cPanel cron job module. I currently have a bunch of cronjobs backing up my databases, looks like this ( and works fine ): mysqldump -u worklabs -pXXXXXXX worklabs_one | gzip -c > /home/worklabs/backup/backup_worklabsone.sql.gz

So I end up with a list of zipped SQL files in a folder called BACKUP, which is what I want. It's the next step that I'm having troubles with: I want to zip that entire BACKUP folder, append the current date to it, and place that zipped folder into another folder, backup_archive. Afterwards I can set up a local script to retrieve the file using SSH.

I can start with something like this: gzip -r /home/worklabs/backup

I'm having troubles getting the syntax right for the process of appending the date and moving the zip into another folder. Any suggestions?

Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 16th July 2018 - 12:11 AM