Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hey everyone, I was hoping someone can help me create a Cron file. I've tried reading through my Linux book but I am just lost here. I need to create a Cron file that will perform a Level 0 backup once per month, a Level 2 dump one day per week, and a Level 5 dump every day that neither a level 0 nor a level 2 dump is performed. Thanks for any help, it is greatly appreciated.
Hey everyone, I was hoping someone can help me create a Cron file. I've tried reading through my Linux book but I am just lost here. I need to create a Cron file that will perform a Level 0 backup once per month, a Level 2 dump one day per week, and a Level 5 dump every day that neither a level 0 nor a level 2 dump is performed. Thanks for any help, it is greatly appreciated.
Well, no idea what you mean by a "level 2" dump, or any of the other "level" backups. Also, you don't say what version/distro of Linux you're using, or what program(s) you're taking these backups with. Hard to give help without details.
So, whatever program you're using to do your backups, write a shell script (if needed), that does what you want for each 'level'. Then schedule them with cron. Your details are vague...you say "once per month", "one day per week". When is "once a month"?? First of the month? 10th? 21st? Same for one day per week...scheduling details are going to be different for all of that criteria. And your 'level 5' dump can just be scheduled for all the other days of the week.
For your question, should the Level 2 only be performed on days there was not a Level 0? And does it matter if the Level 2's are not exactly one week apart (e.g., must they always be run on Sundays)?
In either case, you could maybe do something like:
1. Run the level 0 on the first Sunday of every month
2. Run the level 2 on every Sunday (or Sundays 2-5 of every month if they're not supposed to run on the same day)
3. Run the level 5 M-Sat
First of all: you already have a cron file, it's builtin in Linux when you install it... The file is just empty.
To open the cron file, and execute a command as root, type
Code:
sudo crontab -e
To make a level 0 backup every month, you could type
Well, no idea what you mean by a "level 2" dump, or any of the other "level" backups. Also, you don't say what version/distro of Linux you're using, or what program(s) you're taking these backups with. Hard to give help without details.
TB0ne, what Spyder means with a "level 2" dump: those levels apply to incremental backups and the levels range from 0 to 9, where level number 0 means a full backup and guarantees the entire file system is copied. A level number above 0, incremental backup, tells dump to copy all files new or modified since the last dump of the same or lower level. To be more precise, at each incremental backup level you back up everything that has changed since the previous backup at the same or a previous level.
And Linux has a command named dumb.
---------- Post added 08-17-11 at 06:09 PM ----------
Quote:
Originally Posted by TB0ne
Also, you don't say what version/distro of Linux you're using.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.