title
Linux Backup with TAR and Cron Jobs

description
Info Level: Intermediate Presenter: Eli the Computer Guy Date Created: September 21, 2010 Length of Class: 35 Minutes Tracks Linux Prerequisites Introduction to Linux Installing Linux Basic Linux Tasks VIM for File Editing Navigation in Linux Users, Groups and Permissions in Linux Purpose of Class This class teaches students how to backup directories using TAR, and demonstrates how to schedule tasks using Cron Jobs. Topics Covered Backing Up Directories with TAR Recovering Directories with TAR Setting Up Cron Jobs for Scheduled Tasks Class Notes Backup Using TAR Backup = sudo tar --cvpzf backup.taz.gz --exclude/=directory (recursive) PATH --c = create new file (overwrites old file) --v = verbose --p = preserve permissions --z = compress --f = filename (very important) --exclude=DIRCECTORY is Recursive Naming Files with time = filename-$(date +%F-%T) Recover Files from a TAR File Recover = sudo tar --xvpzf FILE --C /DIRECTORY Capital -C = change to directory -x = extract Cron Jobs To Edit the Crontab File = sudo cron --e (first time it will ask you your default editor) Format = minute (0-59), hour (0-23, 0 = midnight), day (1-31), month (1-12), weekday (0-6, 0 = Sunday), command * Wildcard for Every Minute/Day/Hour/Month?Day of Week Example to Backup Entire Server for 1am Every Morning = 0 1 * * * sudo tar -cvpzf /backup.tar.gz --exclude=/mnt /

detail
{'title': 'Linux Backup with TAR and Cron Jobs', 'heatmap': [{'end': 704.836, 'start': 659.931, 'weight': 0.911}, {'end': 896.5, 'start': 872.569, 'weight': 0.735}, {'end': 1752.292, 'start': 1705.751, 'weight': 0.81}, {'end': 1880.287, 'start': 1855.028, 'weight': 0.844}], 'summary': 'Learn linux backup using tar for easily creating backups, scheduling with cron jobs, recovering data, and scheduling tasks precisely every hour, minute, week, month, or year. explore file recovery, backup scheduling, and task automation for efficient data management in linux.', 'chapters': [{'end': 215.029, 'segs': [{'end': 39.971, 'src': 'embed', 'start': 5.629, 'weight': 1, 'content': [{'end': 6.169, 'text': 'Hello again.', 'start': 5.629, 'duration': 0.54}, {'end': 10.052, 'text': "As you know, I'm Eli the Computer Guy over here for everymanit.com.", 'start': 6.329, 'duration': 3.723}, {'end': 14.915, 'text': "Today's class is Linux backup using TAR and CronJobs.", 'start': 10.292, 'duration': 4.623}, {'end': 23.821, 'text': 'So in the Linux world, the ubiquitous piece of backup software that almost everybody uses is something called TAR.', 'start': 15.315, 'duration': 8.506}, {'end': 27.683, 'text': 'TAR allows you to very easily, quickly, simply, etc.', 'start': 24.261, 'duration': 3.422}, {'end': 30.205, 'text': 'backup files, folders, or your entire system.', 'start': 27.723, 'duration': 2.482}, {'end': 35.048, 'text': "So we'll show you how to use TAR in order to backup your files, folders, or entire system.", 'start': 30.325, 'duration': 4.723}, {'end': 39.971, 'text': 'Then Cron jobs, Cron allows you to schedule tasks.', 'start': 35.548, 'duration': 4.423}], 'summary': 'Eli the computer guy explains linux backup using tar and cronjobs for files, folders, and system backup.', 'duration': 34.342, 'max_score': 5.629, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hGqjM9Wz-pU/pics/hGqjM9Wz-pU5629.jpg'}, {'end': 122.963, 'src': 'embed', 'start': 49.376, 'weight': 0, 'content': [{'end': 59.064, 'text': 'So with Cron jobs, this allows you to schedule tasks every hour, every minute, every week, every month, every year, etc.', 'start': 49.376, 'duration': 9.688}, {'end': 64.069, 'text': "And basically when these tasks trigger, it'll go through and you use cron in order to do that.", 'start': 59.704, 'duration': 4.365}, {'end': 72.078, 'text': "So this class will be teaching you how to back up your system using tar and it'll teach you how to schedule tasks using cron jobs.", 'start': 64.209, 'duration': 7.869}, {'end': 74.441, 'text': "Give me a second and we'll dive into this class.", 'start': 72.619, 'duration': 1.822}, {'end': 83.02, 'text': 'So backing up files using TAR really is dirt simple.', 'start': 80.117, 'duration': 2.903}, {'end': 87.565, 'text': "As long as you know what's going on, you just type out a little command and it happens.", 'start': 83.18, 'duration': 4.385}, {'end': 92.83, 'text': "If you have a small directory that you're backing up, it will literally happen in the blink of an eye.", 'start': 87.985, 'duration': 4.845}, {'end': 96.874, 'text': "If you have a large directory that you're backing up, well, it'll take a little bit of time.", 'start': 92.97, 'duration': 3.904}, {'end': 98.396, 'text': "But it's really, really easy.", 'start': 96.914, 'duration': 1.482}, {'end': 101.999, 'text': 'So the first thing that you have to type into the command line is, of course, sudo.', 'start': 98.856, 'duration': 3.143}, {'end': 104.73, 'text': 'Super user do.', 'start': 103.809, 'duration': 0.921}, {'end': 108.893, 'text': 'You always, always, always do this, especially in editing button tool.', 'start': 104.95, 'duration': 3.943}, {'end': 116.499, 'text': 'Then you have space, and then you put in lowercase t-a-r, because the program tar is called tar.', 'start': 109.433, 'duration': 7.066}, {'end': 122.963, 'text': 'After you put in tar, you have to do a space, and then you have to feed tar a number of arguments.', 'start': 117.359, 'duration': 5.604}], 'summary': 'Learn to schedule tasks with cron jobs & back up system using tar.', 'duration': 73.587, 'max_score': 49.376, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hGqjM9Wz-pU/pics/hGqjM9Wz-pU49376.jpg'}, {'end': 176.761, 'src': 'embed', 'start': 149.421, 'weight': 5, 'content': [{'end': 152.442, 'text': "So if you don't put c in, this can be a very bad thing.", 'start': 149.421, 'duration': 3.021}, {'end': 155.244, 'text': 'Basically all this says is create the backup file.', 'start': 152.482, 'duration': 2.762}, {'end': 160.848, 'text': 'The next thing, next argument you put in is is a lowercase v.', 'start': 155.965, 'duration': 4.883}, {'end': 163.69, 'text': 'The lowercase v stands for verbose.', 'start': 160.848, 'duration': 2.842}, {'end': 170.816, 'text': "This means that the Linux server will tell you what's going on during the backup process.", 'start': 164.011, 'duration': 6.805}, {'end': 176.761, 'text': "So basically it'll say copying this file, copying this file, copying this file, copying this directory, copying this directory.", 'start': 170.916, 'duration': 5.845}], 'summary': "Using 'c' and 'v' options in backup command provides verbose feedback.", 'duration': 27.34, 'max_score': 149.421, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hGqjM9Wz-pU/pics/hGqjM9Wz-pU149421.jpg'}, {'end': 224.131, 'src': 'embed', 'start': 193.616, 'weight': 6, 'content': [{'end': 196.118, 'text': "Somebody who's used Linux for a while probably doesn't care.", 'start': 193.616, 'duration': 2.502}, {'end': 202.344, 'text': "All this V does is it gives you a stream of information about what's happening while the process is going on.", 'start': 196.719, 'duration': 5.625}, {'end': 207.349, 'text': "Otherwise, if you don't put V in there, you basically just get a blinking cursor until it's done.", 'start': 202.905, 'duration': 4.444}, {'end': 209.647, 'text': "doesn't really matter.", 'start': 208.407, 'duration': 1.24}, {'end': 213.428, 'text': 'The next thing is lowercase p.', 'start': 210.908, 'duration': 2.52}, {'end': 215.029, 'text': 'This is one that can be very important.', 'start': 213.428, 'duration': 1.601}, {'end': 219.39, 'text': 'Lowercase p stands for preserving permission.', 'start': 215.509, 'duration': 3.881}, {'end': 224.131, 'text': 'So in one of our other classes we talked about creating all these permissions, you know, 777, 775, 757, whatever.', 'start': 219.43, 'duration': 4.701}], 'summary': "Using 'v' in linux gives real-time process information, 'p' preserves permissions.", 'duration': 30.515, 'max_score': 193.616, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hGqjM9Wz-pU/pics/hGqjM9Wz-pU193616.jpg'}], 'start': 5.629, 'title': 'Linux backup with tar and cronjobs', 'summary': "Covers linux backup using tar for easily, quickly, and simply backing up files, folders, or entire systems, and scheduling automatic backups using cron jobs, allowing tasks to be scheduled every hour, minute, week, month, or year. it also explains the essential steps for using the tar command in linux for creating or overwriting a backup file, emphasizing the importance of using 'sudo' and specifying necessary arguments, including 'c' for creating the backup file and 'v' for verbosity to monitor the backup process. additionally, it discusses using the v option to provide a constant stream of information while copying files in linux, which can be helpful for new users, and the significance of the lowercase p option.", 'chapters': [{'end': 98.396, 'start': 5.629, 'title': 'Linux backup with tar and cronjobs', 'summary': 'Covers linux backup using tar for easily, quickly, and simply backing up files, folders, or entire systems, and scheduling automatic backups using cron jobs, allowing tasks to be scheduled every hour, minute, week, month, or year.', 'duration': 92.767, 'highlights': ['Using TAR, you can easily, quickly, and simply back up files, folders, or the entire system, making it a ubiquitous piece of backup software in the Linux world.', 'Cron jobs allow scheduling tasks every hour, minute, week, month, or year, providing the capability to schedule automatic backups of the system.', 'Backing up files using TAR is straightforward, with quick backup for small directories and slightly longer duration for larger directories.']}, {'end': 170.816, 'start': 98.856, 'title': 'Using tar command for backup', 'summary': "Explains the essential steps for using the tar command in linux for creating or overwriting a backup file, emphasizing the importance of using 'sudo' and specifying necessary arguments, including 'c' for creating the backup file and 'v' for verbosity to monitor the backup process.", 'duration': 71.96, 'highlights': ["The first step is to use 'sudo' followed by 'tar' command with necessary arguments, emphasizing the importance of using 'c' to create or overwrite a backup file and 'v' for verbosity to monitor the backup process.", "The program tar should be used with the 'sudo' command for superuser privileges.", "The 'c' argument in TAR instructs it to create or overwrite a backup file, while the 'v' argument enables the verbose mode to monitor the backup process."]}, {'end': 215.029, 'start': 170.916, 'title': 'Using v and p options in linux', 'summary': 'Discusses using the v option to provide a constant stream of information while copying files in linux, which can be helpful for new users, and the significance of the lowercase p option.', 'duration': 44.113, 'highlights': ['The V option provides a constant stream of information while copying files in Linux, which can be useful for new users who may be less confident about Linux.', 'The lowercase p option in Linux can be very important but is not elaborated further in the transcript.']}], 'duration': 209.4, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hGqjM9Wz-pU/pics/hGqjM9Wz-pU5629.jpg', 'highlights': ['Cron jobs allow scheduling tasks every hour, minute, week, month, or year, providing the capability to schedule automatic backups of the system.', 'Using TAR, you can easily, quickly, and simply back up files, folders, or the entire system, making it a ubiquitous piece of backup software in the Linux world.', 'Backing up files using TAR is straightforward, with quick backup for small directories and slightly longer duration for larger directories.', "The first step is to use 'sudo' followed by 'tar' command with necessary arguments, emphasizing the importance of using 'c' to create or overwrite a backup file and 'v' for verbosity to monitor the backup process.", "The program tar should be used with the 'sudo' command for superuser privileges.", "The 'c' argument in TAR instructs it to create or overwrite a backup file, while the 'v' argument enables the verbose mode to monitor the backup process.", 'The V option provides a constant stream of information while copying files in Linux, which can be useful for new users who may be less confident about Linux.']}, {'end': 467.077, 'segs': [{'end': 247.377, 'src': 'embed', 'start': 215.509, 'weight': 1, 'content': [{'end': 219.39, 'text': 'Lowercase p stands for preserving permission.', 'start': 215.509, 'duration': 3.881}, {'end': 224.131, 'text': 'So in one of our other classes we talked about creating all these permissions, you know, 777, 775, 757, whatever.', 'start': 219.43, 'duration': 4.701}, {'end': 232.354, 'text': "If you don't put p here, TAR will not preserve those permissions.", 'start': 224.151, 'duration': 8.203}, {'end': 239.295, 'text': "So if you're doing a backup for, let's say, your server, you're doing a backup for your web server and you don't put P in here,", 'start': 232.394, 'duration': 6.901}, {'end': 241.116, 'text': 'TAR will rip out those permissions.', 'start': 239.295, 'duration': 1.821}, {'end': 247.377, 'text': "And so if you have to do a recovery of your web server, you're going to have to go back in and reset all of your permissions.", 'start': 241.176, 'duration': 6.201}], 'summary': 'Preserve permissions with lowercase p in tar to avoid resetting them during recovery.', 'duration': 31.868, 'max_score': 215.509, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hGqjM9Wz-pU/pics/hGqjM9Wz-pU215509.jpg'}, {'end': 286.788, 'src': 'embed', 'start': 262.956, 'weight': 0, 'content': [{'end': 272.161, 'text': "So this will tell tar that once it's created a tar file of all these backup files, then to compress the file further.", 'start': 262.956, 'duration': 9.205}, {'end': 274.402, 'text': 'So this is something called a tar ball.', 'start': 272.481, 'duration': 1.921}, {'end': 280.245, 'text': 'So initially tar creates a single backup file from all your files and folders.', 'start': 274.622, 'duration': 5.623}, {'end': 286.788, 'text': 'Then with the Z command, it will try to shrink and compress that single file down to be as small as possible.', 'start': 280.785, 'duration': 6.003}], 'summary': 'Tar creates a backup file from all files and folders, then compresses it to be as small as possible.', 'duration': 23.832, 'max_score': 262.956, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hGqjM9Wz-pU/pics/hGqjM9Wz-pU262956.jpg'}, {'end': 398.476, 'src': 'embed', 'start': 359.903, 'weight': 3, 'content': [{'end': 363.384, 'text': "Again, this is not the Windows world, you don't have to worry about something weird happening.", 'start': 359.903, 'duration': 3.481}, {'end': 367.627, 'text': "Always compress unless you really don't need to for some reason.", 'start': 363.985, 'duration': 3.642}, {'end': 375.452, 'text': 'And then finally, f, this allows you to give tar a file name of what you are backing this file up as.', 'start': 368.047, 'duration': 7.405}, {'end': 377.814, 'text': "If you don't put in f, again, nothing goes well.", 'start': 375.512, 'duration': 2.302}, {'end': 386.54, 'text': "So out of all these, the only thing that I would skip is the v argument, just because I trust Linux, so there's no reason to see the verbose.", 'start': 377.854, 'duration': 8.686}, {'end': 392.724, 'text': 'So after the f, you then put in the file name that you want this thing backed up as.', 'start': 387.3, 'duration': 5.424}, {'end': 393.645, 'text': 'So you do backup.', 'start': 392.744, 'duration': 0.901}, {'end': 398.476, 'text': "So it'll create the backup file as backup.", 'start': 396.075, 'duration': 2.401}], 'summary': 'In linux, always compress files when backing up, skip verbose option.', 'duration': 38.573, 'max_score': 359.903, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hGqjM9Wz-pU/pics/hGqjM9Wz-pU359903.jpg'}], 'start': 215.509, 'title': 'Creating and compressing tar ball backups', 'summary': "Explains the process of creating a tar ball backup using the 'tar' command to create a single backup file from all files and folders, emphasizing the benefits of compression and the necessity of using the 'f' argument to specify the file name.", 'chapters': [{'end': 262.896, 'start': 215.509, 'title': 'Tar backup and recovery', 'summary': 'Discusses the importance of using lowercase p for preserving permissions and lowercase z for compression in tar backups, emphasizing the consequences of not using them and recommending their usage.', 'duration': 47.387, 'highlights': ['The lowercase p in TAR commands is crucial for preserving permissions, preventing the need to reset permissions during recovery.', 'Using lowercase z in TAR commands enables compression, optimizing the backup process and reducing storage space.']}, {'end': 467.077, 'start': 262.956, 'title': 'Creating and compressing tar ball backups', 'summary': "Explains the process of creating a tar ball backup, highlighting the use of 'tar' command to create a single backup file from all files and folders and compressing it with the 'z' command, emphasizing the benefits of compression and the necessity of using the 'f' argument to specify the file name.", 'duration': 204.121, 'highlights': ["The 'tar' command is used to create a single backup file from all files and folders.", "The 'Z' command is utilized to compress the single backup file, emphasizing the benefits of compression.", "The use of the lowercase 'f' argument is necessary to specify the file name for backing up the files.", 'The chapter advises to always compress the backup file unless there is a genuine reason not to do so, highlighting the reliability of compression in Linux environment.', "The need for specifying the file name using the 'f' argument is emphasized, as it is essential for the backup process."]}], 'duration': 251.568, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hGqjM9Wz-pU/pics/hGqjM9Wz-pU215509.jpg', 'highlights': ['Using lowercase z in TAR commands enables compression, optimizing the backup process and reducing storage space.', 'The lowercase p in TAR commands is crucial for preserving permissions, preventing the need to reset permissions during recovery.', "The 'tar' command is used to create a single backup file from all files and folders.", "The use of the lowercase 'f' argument is necessary to specify the file name for backing up the files.", "The need for specifying the file name using the 'f' argument is emphasized, as it is essential for the backup process.", "The 'Z' command is utilized to compress the single backup file, emphasizing the benefits of compression.", 'The chapter advises to always compress the backup file unless there is a genuine reason not to do so, highlighting the reliability of compression in Linux environment.']}, {'end': 901.042, 'segs': [{'end': 570.474, 'src': 'embed', 'start': 543.703, 'weight': 5, 'content': [{'end': 549.585, 'text': "So since we're backing up the entire system, let's say, we will say we want to back up root.", 'start': 543.703, 'duration': 5.882}, {'end': 553.947, 'text': 'So this will back up root and it will exclude the mount directory.', 'start': 549.746, 'duration': 4.201}, {'end': 559.55, 'text': "Now, if you wanted to back up, let's say just your www folder.", 'start': 554.928, 'duration': 4.622}, {'end': 562.031, 'text': "let's say, you know you're just backing up your website.", 'start': 559.95, 'duration': 2.081}, {'end': 569.594, 'text': 'you could do var www and that would back up just your website.', 'start': 562.031, 'duration': 7.563}, {'end': 570.474, 'text': "it's really that easy.", 'start': 569.594, 'duration': 0.88}], 'summary': 'Backing up system files like root and excluding specific directories is straightforward and easy.', 'duration': 26.771, 'max_score': 543.703, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hGqjM9Wz-pU/pics/hGqjM9Wz-pU543703.jpg'}, {'end': 628.273, 'src': 'embed', 'start': 596.194, 'weight': 0, 'content': [{'end': 598.017, 'text': 'then it will just back up everything for you.', 'start': 596.194, 'duration': 1.823}, {'end': 601.581, 'text': "This is one of those things that you've got to kind of play with with the exclude command.", 'start': 598.137, 'duration': 3.444}, {'end': 605.744, 'text': 'Just understand Linux is very, very, very specific with this.', 'start': 602.102, 'duration': 3.642}, {'end': 609.866, 'text': "And if you don't get this right, like I said, it just won't exclude anything.", 'start': 606.284, 'duration': 3.582}, {'end': 612.307, 'text': "So with that, let's go to the computer.", 'start': 610.026, 'duration': 2.281}, {'end': 614.347, 'text': "Like I said, I'll do a backup.", 'start': 612.447, 'duration': 1.9}, {'end': 615.308, 'text': "I'll show you how this works.", 'start': 614.407, 'duration': 0.901}, {'end': 617.449, 'text': 'This really, really is dirt simple.', 'start': 615.528, 'duration': 1.921}, {'end': 621.71, 'text': 'Just remember sudo tar arguments.', 'start': 617.529, 'duration': 4.181}, {'end': 628.273, 'text': 'And again, out of these arguments, the only thing, the only one that I would say that you may not want to do is the verbose,', 'start': 621.91, 'duration': 6.363}], 'summary': 'Using exclude command in linux for backup is crucial and specific.', 'duration': 32.079, 'max_score': 596.194, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hGqjM9Wz-pU/pics/hGqjM9Wz-pU596194.jpg'}, {'end': 704.836, 'src': 'heatmap', 'start': 637.317, 'weight': 1, 'content': [{'end': 642.819, 'text': "I would suggest you call it backup.tar to say it's a tar file and .", 'start': 637.317, 'duration': 5.502}, {'end': 647.001, 'text': "gz to say that it's a tar ball, so it's a compressed tar file.", 'start': 642.819, 'duration': 4.182}, {'end': 656.088, 'text': 'Then if you want to exclude folders, you do space, hyphen, hyphen, exclude, equals, and then whatever the folder path is that you want to exclude.', 'start': 647.461, 'duration': 8.627}, {'end': 659.871, 'text': 'Then you do space, and then you say what it is you want to back up.', 'start': 656.849, 'duration': 3.022}, {'end': 662.293, 'text': "So in this, we're saying we want to back up root.", 'start': 659.931, 'duration': 2.362}, {'end': 664.175, 'text': 'So this means the entire computer.', 'start': 662.413, 'duration': 1.762}, {'end': 673.102, 'text': 'Like I say, if we just wanted to back up the www folder, we would do slash var slash www, and that would only back up the www folder.', 'start': 664.615, 'duration': 8.487}, {'end': 674.323, 'text': "It's really easy.", 'start': 673.602, 'duration': 0.721}, {'end': 676.945, 'text': "So let's go over to the computer, and I'll show you how this works.", 'start': 674.383, 'duration': 2.562}, {'end': 681.219, 'text': "So now it's done.", 'start': 680.478, 'duration': 0.741}, {'end': 686.062, 'text': 'To back up the www folder, it took about two or three minutes total.', 'start': 681.239, 'duration': 4.823}, {'end': 694.989, 'text': "Now what we can do to make sure that it's actually there is we can do the ls space hyphen l.", 'start': 686.623, 'duration': 8.366}, {'end': 704.836, 'text': 'And we can see that there is that www.backup.tar.gz folder, or tarball, all the way at the end of the directory listings.', 'start': 694.989, 'duration': 9.847}], 'summary': 'Suggest using backup.tar.gz for compressed tar file, excluding folders, backing up root took 2-3 mins.', 'duration': 24.976, 'max_score': 637.317, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hGqjM9Wz-pU/pics/hGqjM9Wz-pU637317.jpg'}, {'end': 713.807, 'src': 'embed', 'start': 686.623, 'weight': 4, 'content': [{'end': 694.989, 'text': "Now what we can do to make sure that it's actually there is we can do the ls space hyphen l.", 'start': 686.623, 'duration': 8.366}, {'end': 704.836, 'text': 'And we can see that there is that www.backup.tar.gz folder, or tarball, all the way at the end of the directory listings.', 'start': 694.989, 'duration': 9.847}, {'end': 708.319, 'text': 'So that is all you have to do in order to create a tarball.', 'start': 704.996, 'duration': 3.323}, {'end': 713.807, 'text': "Since we've gone over that, let's go back out to the real world, and I'll explain how to recover files from a tarball.", 'start': 708.686, 'duration': 5.121}], 'summary': "Creating a tarball is done using the 'ls -l' command, and recovering files from a tarball will be explained next.", 'duration': 27.184, 'max_score': 686.623, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hGqjM9Wz-pU/pics/hGqjM9Wz-pU686623.jpg'}, {'end': 821.435, 'src': 'embed', 'start': 794.612, 'weight': 3, 'content': [{'end': 799.336, 'text': 'We have a lot of files that we want to back up, but we have one video folder that has 30 or 40 gigs.', 'start': 794.612, 'duration': 4.724}, {'end': 804.501, 'text': "of video files that we don't want to back up every time we do a backup.", 'start': 801.218, 'duration': 3.283}, {'end': 805.502, 'text': "There's just no point.", 'start': 804.781, 'duration': 0.721}, {'end': 806.843, 'text': "There's one central backup of it.", 'start': 805.542, 'duration': 1.301}, {'end': 808.244, 'text': "That's all we need to worry about.", 'start': 807.183, 'duration': 1.061}, {'end': 816.071, 'text': "So we want to exclude that folder so that we don't back up, you know, 40 gigs unnecessarily.", 'start': 808.344, 'duration': 7.727}, {'end': 821.435, 'text': 'So to back up, you do the space, hyphen, hyphen, exclude.', 'start': 816.211, 'duration': 5.224}], 'summary': 'Exclude a 30-40 gig video folder from backup to save space and time.', 'duration': 26.823, 'max_score': 794.612, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hGqjM9Wz-pU/pics/hGqjM9Wz-pU794612.jpg'}, {'end': 872.068, 'src': 'embed', 'start': 847.441, 'weight': 2, 'content': [{'end': 859.671, 'text': "So it's pseudo tar hyphen CVP ZF file name will be www backup.tar.gz exclude the video folder and back up the forward slash var forward slash WWW.", 'start': 847.441, 'duration': 12.23}, {'end': 861.224, 'text': 'And then you hit Enter.', 'start': 860.464, 'duration': 0.76}, {'end': 870.628, 'text': "Now, since I put that V in there for verbose, we are now going to see all the things that it's copying into the tar file.", 'start': 862.165, 'duration': 8.463}, {'end': 872.068, 'text': "So they'll all go streaming past.", 'start': 870.648, 'duration': 1.42}], 'summary': "Creating a backup file 'www_backup.tar.gz' excluding the video folder, using pseudo tar with verbose option.", 'duration': 24.627, 'max_score': 847.441, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hGqjM9Wz-pU/pics/hGqjM9Wz-pU847441.jpg'}, {'end': 896.5, 'src': 'heatmap', 'start': 872.569, 'weight': 0.735, 'content': [{'end': 880.992, 'text': 'So as you see, the wp-admin folder there, I set up a little WordPress site on this particular web server.', 'start': 872.569, 'duration': 8.423}, {'end': 883.793, 'text': "So that's what you're seeing, the wp-includes, et cetera.", 'start': 881.092, 'duration': 2.701}, {'end': 896.5, 'text': "So, see, it's that easy to create a tarball, so a backup of your system.", 'start': 891.437, 'duration': 5.063}], 'summary': 'Wordpress site set up on web server with easy tarball backup creation', 'duration': 23.931, 'max_score': 872.569, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hGqjM9Wz-pU/pics/hGqjM9Wz-pU872569.jpg'}], 'start': 467.778, 'title': 'Creating and excluding folders in linux backups', 'summary': 'Covers the process of creating tarballs for linux backups, excluding folders, and emphasizes the importance of accurately specifying the exclude command. it also explains creating a tarball, verifying its presence, and emphasizes the simplicity and efficiency of the process.', 'chapters': [{'end': 737.692, 'start': 467.778, 'title': 'Creating and excluding folders in linux backups', 'summary': 'Explains the process of creating tarballs for linux backups, including excluding folders to be backed up, and emphasizes the importance of accurately specifying the exclude command to avoid unexpected inclusions in the backup. it also demonstrates creating a tarball and verifying its presence.', 'duration': 269.914, 'highlights': ['The chapter emphasizes the importance of accurately specifying the exclude command to avoid unexpected inclusions in the backup, as Linux strictly follows the provided commands and does not attempt to interpret user intentions.', 'It demonstrates the process of creating tarballs for Linux backups, including excluding specific folders to be backed up, and provides examples such as excluding the mount directory and backing up the entire system or specific folders like /var/www.', "The process of creating a tarball and verifying its presence is demonstrated, with a mention of the time taken for backing up the www folder and the use of 'ls -l' command to confirm the tarball's existence."]}, {'end': 901.042, 'start': 737.832, 'title': 'Creating tarball backups with exclusions', 'summary': 'Explains how to create a tarball backup using the tar command with options for compression, exclusion of specific directories, and verbose output, and emphasizes the simplicity and efficiency of the process.', 'duration': 163.21, 'highlights': ["Creating a tarball backup with exclusion of specific directories and compression using the tar command is demonstrated, simplifying the backup process. The chapter explains the command 'sudo tar -CVPZF' to create a tarball backup, excluding the video folder and compressing it into a file named wwwbackup.tar.gz.", 'The use of verbose option (V) in the tar command to display the files being copied into the tar file is highlighted, emphasizing the visibility and transparency in the backup process. The chapter mentions the inclusion of the verbose option (V) in the tar command to display the files being copied into the tar file, providing transparency in the backup process.', 'The need to exclude large directories, such as a video folder, from regular backups to optimize storage usage is emphasized, citing an example of excluding a 30-40 GB video folder to prevent unnecessary backups. The chapter emphasizes the importance of excluding large directories, like a 30-40 GB video folder, from regular backups to optimize storage usage and prevent unnecessary backups.']}], 'duration': 433.264, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hGqjM9Wz-pU/pics/hGqjM9Wz-pU467778.jpg', 'highlights': ['The chapter emphasizes the importance of accurately specifying the exclude command to avoid unexpected inclusions in the backup, as Linux strictly follows the provided commands and does not attempt to interpret user intentions.', "Creating a tarball backup with exclusion of specific directories and compression using the tar command is demonstrated, simplifying the backup process. The chapter explains the command 'sudo tar -CVPZF' to create a tarball backup, excluding the video folder and compressing it into a file named wwwbackup.tar.gz.", 'The use of verbose option (V) in the tar command to display the files being copied into the tar file is highlighted, emphasizing the visibility and transparency in the backup process. The chapter mentions the inclusion of the verbose option (V) in the tar command to display the files being copied into the tar file, providing transparency in the backup process.', 'The need to exclude large directories, such as a video folder, from regular backups to optimize storage usage is emphasized, citing an example of excluding a 30-40 GB video folder to prevent unnecessary backups.', "The process of creating a tarball and verifying its presence is demonstrated, with a mention of the time taken for backing up the www folder and the use of 'ls -l' command to confirm the tarball's existence.", 'It demonstrates the process of creating tarballs for Linux backups, including excluding specific folders to be backed up, and provides examples such as excluding the mount directory and backing up the entire system or specific folders like /var/www.']}, {'end': 1128.02, 'segs': [{'end': 953.427, 'src': 'embed', 'start': 901.482, 'weight': 1, 'content': [{'end': 909.966, 'text': 'So now that you do have this backup tarball, now how do you recover it? If your computer crashes, etc.', 'start': 901.482, 'duration': 8.484}, {'end': 915.549, 'text': ', what do you do? Again, it is just as simple to recover a tarball as it is to create one.', 'start': 909.966, 'duration': 5.583}, {'end': 919.291, 'text': 'First thing, the command you do, of course, is the sudo command.', 'start': 915.989, 'duration': 3.302}, {'end': 926.571, 'text': 'And of course, you do tar, so pseudo space tar.', 'start': 921.448, 'duration': 5.123}, {'end': 930.894, 'text': 'After that, you again have to feed it some arguments.', 'start': 927.171, 'duration': 3.723}, {'end': 937.337, 'text': "Now here, the argument you're going to feed it first is x, lowercase x, that means extract.", 'start': 931.414, 'duration': 5.923}, {'end': 941.24, 'text': "So basically what you're saying is we need to extract information from a tar ball.", 'start': 937.478, 'duration': 3.762}, {'end': 944.241, 'text': 'Then you can put in v if you want.', 'start': 941.82, 'duration': 2.421}, {'end': 946.943, 'text': "again, this isn't verbose, it's up to you.", 'start': 944.241, 'duration': 2.702}, {'end': 950.305, 'text': 'then p Again.', 'start': 946.943, 'duration': 3.362}, {'end': 953.427, 'text': 'this is for permissions, so that it preserves the permissions, because,', 'start': 950.305, 'duration': 3.122}], 'summary': 'To recover a backup tarball, use sudo tar xvpf to preserve permissions and extract the information.', 'duration': 51.945, 'max_score': 901.482, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hGqjM9Wz-pU/pics/hGqjM9Wz-pU901482.jpg'}, {'end': 1083.727, 'src': 'embed', 'start': 1056.525, 'weight': 0, 'content': [{'end': 1061.669, 'text': "directory. So what'll happen is it'll uncompress the tarball,", 'start': 1056.525, 'duration': 5.144}, {'end': 1068.755, 'text': "it'll take all the files and folders and then it will plop those files and folders into the recover directory.", 'start': 1061.669, 'duration': 7.086}, {'end': 1075.2, 'text': "You want to be careful with this because depending upon what you're doing, again, you don't want to overwrite files that you may need.", 'start': 1069.135, 'duration': 6.065}, {'end': 1076.661, 'text': 'So that can be a bad thing.', 'start': 1075.52, 'duration': 1.141}, {'end': 1083.727, 'text': 'Like I said, I would say recover back to something like a recover directory and then put things back as need be.', 'start': 1077.021, 'duration': 6.706}], 'summary': 'Uncompresses tarball, places files into recover directory, warns about overwriting.', 'duration': 27.202, 'max_score': 1056.525, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hGqjM9Wz-pU/pics/hGqjM9Wz-pU1056525.jpg'}], 'start': 901.482, 'title': 'Recovering data from tarballs', 'summary': 'Demonstrates how to recover tarball data using commands such as sudo, tar, x, v, p, z, and f to extract, preserve permissions, uncompress, and specify the file name. it also explains the process of extracting files from a tarball and recovering files and folders, emphasizing caution and specific command syntax.', 'chapters': [{'end': 976.426, 'start': 901.482, 'title': 'Recovering tarball data', 'summary': 'Demonstrates how to recover a tarball, emphasizing the commands and arguments required, such as sudo, tar, x, v, p, z, and f, to extract, preserve permissions, uncompress, and specify the file name.', 'duration': 74.944, 'highlights': ['The process of recovering a tarball is as simple as creating one, involving commands like sudo, tar, and specific arguments such as x, v, p, Z, and F.', "Using 'x' as an argument specifies the extraction of information from the tarball, while 'p' is employed to preserve permissions, crucial when recovering entire systems or specific folders.", "The 'Z' argument is used to uncompress the tar file, ensuring the retrieval of compressed data, and the 'F' command is employed to specify the file name during the recovery process."]}, {'end': 1025.742, 'start': 976.846, 'title': 'Extracting files from tar ball', 'summary': 'Discusses extracting files from a tar ball, explaining the difference between a tar file and a tar ball, and the process of recovering files from a tar ball, emphasizing the importance of not putting z in when dealing with uncompressed files.', 'duration': 48.896, 'highlights': ['The difference between a tar file and a tar ball is that a tar file backs up everything and puts it into a single file, while a tar ball puts it into a single file and then compresses it further.', 'It is important not to put Z in when dealing with uncompressed files, as it may not be a compressed file.', 'The process of recovering files from a tar ball involves specifying the file you want to recover from, such as backup.tar.gz.']}, {'end': 1128.02, 'start': 1025.762, 'title': 'Recovering files and folders from a tarball', 'summary': "Explains the process of recovering files and folders from a tarball using the 'tar' command, which involves specifying a different directory for recovery, uncompressing the tarball, and being cautious of overwriting files; it also outlines the specific command syntax for the recovery process.", 'duration': 102.258, 'highlights': ["The 'tar' command is used to recover files and folders from a tarball by specifying a different directory for recovery, uncompressing the tarball, and being cautious of overwriting files.", 'Creating a separate recovery directory under root is recommended to prevent overwriting crucial files during the recovery process.', "The recovery process using the 'tar' command is a one-shot deal, and specific files and folders cannot be individually extracted from the tarball.", "The specific command syntax for the recovery process involves using 'sudo tar -xvzp' to extract, maintain permissions, uncompress, and specify the file name for recovery."]}], 'duration': 226.538, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hGqjM9Wz-pU/pics/hGqjM9Wz-pU901482.jpg', 'highlights': ["The 'tar' command is used to recover files and folders from a tarball by specifying a different directory for recovery, uncompressing the tarball, and being cautious of overwriting files.", "Using 'x' as an argument specifies the extraction of information from the tarball, while 'p' is employed to preserve permissions, crucial when recovering entire systems or specific folders.", 'The process of recovering a tarball is as simple as creating one, involving commands like sudo, tar, and specific arguments such as x, v, p, Z, and F.', 'Creating a separate recovery directory under root is recommended to prevent overwriting crucial files during the recovery process.', "The specific command syntax for the recovery process involves using 'sudo tar -xvzp' to extract, maintain permissions, uncompress, and specify the file name for recovery."]}, {'end': 1625.339, 'segs': [{'end': 1227.94, 'src': 'embed', 'start': 1200.282, 'weight': 0, 'content': [{'end': 1207.029, 'text': 'Then we do lsl again to list the contents and we see here are all the contents of the www folder.', 'start': 1200.282, 'duration': 6.747}, {'end': 1213.916, 'text': 'So this shows you how you can back up using tar and how you can recover using tar.', 'start': 1207.63, 'duration': 6.286}, {'end': 1221.604, 'text': "Now that you've recovered this into the recover folder, you can go through here and you can copy and you can move as you please.", 'start': 1213.976, 'duration': 7.628}, {'end': 1227.94, 'text': 'Like I say, if you If you recover directly back to the target directory, you may overwrite files by accident.', 'start': 1221.644, 'duration': 6.296}], 'summary': 'Demonstrates using tar to back up and recover files, with caution against overwriting files by accident.', 'duration': 27.658, 'max_score': 1200.282, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hGqjM9Wz-pU/pics/hGqjM9Wz-pU1200282.jpg'}, {'end': 1331.478, 'src': 'embed', 'start': 1294.497, 'weight': 1, 'content': [{'end': 1302.792, 'text': 'So in order to extract the files and folders from that tarball to the recovery directory, all we do is we do sudo.', 'start': 1294.497, 'duration': 8.295}, {'end': 1314.647, 'text': 'space tar space hyphen x for extract, v for verbose, p for permissions, z for compression, f for file.', 'start': 1304.318, 'duration': 10.329}, {'end': 1322.173, 'text': 'We then give it the file name, www.backup.tar.gz.', 'start': 1315.368, 'duration': 6.805}, {'end': 1323.294, 'text': 'So this is a tar ball.', 'start': 1322.333, 'duration': 0.961}, {'end': 1331.478, 'text': 'We are recovering the information from hyphen, uppercase C, space, forward slash, recover.', 'start': 1323.314, 'duration': 8.164}], 'summary': 'Extract files and folders from tarball to recovery directory using sudo and specific options.', 'duration': 36.981, 'max_score': 1294.497, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hGqjM9Wz-pU/pics/hGqjM9Wz-pU1294497.jpg'}, {'end': 1381.305, 'src': 'embed', 'start': 1356.003, 'weight': 2, 'content': [{'end': 1363.23, 'text': 'the biggest task most people are worried about is scheduling backups, and so how you do this is you set up a cron job again.', 'start': 1356.003, 'duration': 7.227}, {'end': 1365.852, 'text': "this is all very simple, as long as you know what's going on.", 'start': 1363.23, 'duration': 2.622}, {'end': 1369.195, 'text': "so you're going to type in the command in order to set up your cron jobs.", 'start': 1365.852, 'duration': 3.343}, {'end': 1381.305, 'text': "you'll put in sudo, of course, space, and then you're going to type in cron tab C-R-O-N-T-A-B space hyphen E.", 'start': 1369.195, 'duration': 12.11}], 'summary': "Setting up cron jobs is crucial for scheduling backups, achieved via a simple command 'sudo cron tab -e.'", 'duration': 25.302, 'max_score': 1356.003, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hGqjM9Wz-pU/pics/hGqjM9Wz-pU1356003.jpg'}, {'end': 1609.671, 'src': 'embed', 'start': 1582.216, 'weight': 3, 'content': [{'end': 1588.719, 'text': 'so then we go to day of week and then we put in space two, and then after that there would be space,', 'start': 1582.216, 'duration': 6.503}, {'end': 1592.381, 'text': 'and then you type out the full command of whatever it is that you want to run.', 'start': 1588.719, 'duration': 3.662}, {'end': 1601.807, 'text': 'sudo, and you put in the whole thing, so sudo tar-cvp, etc.', 'start': 1593.662, 'duration': 8.145}, {'end': 1603.127, 'text': 'You put in the entire command.', 'start': 1601.947, 'duration': 1.18}, {'end': 1605.048, 'text': "That's all you do to schedule.", 'start': 1603.468, 'duration': 1.58}, {'end': 1609.671, 'text': "And again, you know, it's a little bit of mental work, you kind of have to sit there and do a little bit of math.", 'start': 1605.088, 'duration': 4.583}], 'summary': 'To schedule a command, input day of week, space two, and full command with sudo, requiring mental work and math.', 'duration': 27.455, 'max_score': 1582.216, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hGqjM9Wz-pU/pics/hGqjM9Wz-pU1582216.jpg'}], 'start': 1128.641, 'title': 'File recovery and backup scheduling in linux', 'summary': 'Covers the process of recovering files and folders using tar, emphasizing the creation of a recovery directory, and mentions scheduling tasks using cron jobs. it also explains setting up cron jobs for scheduling backups, emphasizing simplicity and understanding the scheduling format and command input. additionally, it details how to schedule tasks in linux using cron jobs, allowing for precise time-based automation.', 'chapters': [{'end': 1356.003, 'start': 1128.641, 'title': 'Using tar for file recovery', 'summary': 'Explains the process of recovering files and folders using tar, emphasizing the importance of creating a recovery directory to prevent accidental overwriting, and concluding with a mention of scheduling tasks using cron jobs.', 'duration': 227.362, 'highlights': ['The process of recovering files and folders using tar is demonstrated, emphasizing the importance of creating a recovery directory to prevent accidental overwriting. Demonstrates the step-by-step process of recovering files and folders using tar, emphasizing the creation of a recovery directory to prevent accidental overwriting.', "The command 'sudo tar -xvpzf www.backup.tar.gz -C /recover' is used to extract files and folders from the tarball to the recovery directory, ensuring verbose output and preserving permissions. Demonstrates the specific command used ('sudo tar -xvpzf www.backup.tar.gz -C /recover') to extract files and folders from the tarball to the recovery directory with verbose output and permissions preservation.", 'The importance of scheduling tasks using cron jobs is briefly mentioned at the end of the chapter. Briefly mentions the importance of scheduling tasks using cron jobs at the end of the chapter.']}, {'end': 1475.423, 'start': 1356.003, 'title': 'Scheduling backups using cron jobs', 'summary': 'Explains how to set up cron jobs for scheduling backups in linux, emphasizing the simplicity of the process and the significance of understanding the scheduling format and command input.', 'duration': 119.42, 'highlights': ['The process of setting up cron jobs for scheduling backups in Linux is simplified, requiring the understanding of the scheduling format and command input.', 'The crontab file is a very simple text file, and the process of editing it using Vim or another text editor is straightforward and efficient.', 'The scheduling format in the crontab file allows for specifying the timing of tasks using M H DOM M DOW and then entering the command for the task.', 'The significance of remembering that things start with zero when scheduling tasks using cron jobs in Linux.']}, {'end': 1625.339, 'start': 1476.343, 'title': 'Scheduling tasks in linux', 'summary': 'Explains how to schedule tasks in linux using cron jobs, specifying minute, hour, day of month, month, day of week, and command, allowing for precise time-based automation.', 'duration': 148.996, 'highlights': ['You can schedule tasks by specifying minute, hour, day of month, month, day of week, and command, providing flexibility and control over when the task runs.', 'In the Linux world, the weekday starts on Sunday, so 0 is Sunday, 1 is Monday, Tuesday, etc, enabling users to specify the day of the week effectively.', "The use of asterisk (*) as a wildcard allows for flexibility in scheduling, enabling users to specify 'I don't care, any' for certain time parameters.", 'Users can schedule tasks to occur at specific times, such as 2:30 in the morning every Tuesday, by inputting the desired time and the day of the week, followed by the full command to be executed.', 'The scheduling process involves specifying minute, hour, day of month, month, day of week, and the full command to be executed, providing a comprehensive framework for time-based automation.']}], 'duration': 496.698, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hGqjM9Wz-pU/pics/hGqjM9Wz-pU1128641.jpg', 'highlights': ['Demonstrates the step-by-step process of recovering files and folders using tar, emphasizing the creation of a recovery directory to prevent accidental overwriting.', "The command 'sudo tar -xvpzf www.backup.tar.gz -C /recover' is used to extract files and folders from the tarball to the recovery directory, ensuring verbose output and preserving permissions.", 'The process of setting up cron jobs for scheduling backups in Linux is simplified, requiring the understanding of the scheduling format and command input.', 'The scheduling process involves specifying minute, hour, day of month, month, day of week, and the full command to be executed, providing a comprehensive framework for time-based automation.', 'You can schedule tasks by specifying minute, hour, day of month, month, day of week, and command, providing flexibility and control over when the task runs.']}, {'end': 2126.762, 'segs': [{'end': 1655.301, 'src': 'embed', 'start': 1625.439, 'weight': 0, 'content': [{'end': 1631.262, 'text': 'The day of the week, we want this to happen every Tuesday, so we put two and then space the entire command.', 'start': 1625.439, 'duration': 5.823}, {'end': 1636.105, 'text': "If you do that, That's all you have to do to schedule a job.", 'start': 1632.062, 'duration': 4.043}, {'end': 1646.214, 'text': 'Now, if you want to delete a job, all you do is you use sudo crontab space hyphen e, you reopen the file, and you just delete that line of the file.', 'start': 1636.346, 'duration': 9.868}, {'end': 1647.215, 'text': "That's all you have to do.", 'start': 1646.414, 'duration': 0.801}, {'end': 1655.301, 'text': 'Now again, you are going to be editing a text file using whatever editor text editor you have decided to use.', 'start': 1647.735, 'duration': 7.566}], 'summary': "To schedule a job for every tuesday, use '2' and for deleting a job, use 'sudo crontab -e' to remove the line.", 'duration': 29.862, 'max_score': 1625.439, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hGqjM9Wz-pU/pics/hGqjM9Wz-pU1625439.jpg'}, {'end': 1758.895, 'src': 'heatmap', 'start': 1705.751, 'weight': 1, 'content': [{'end': 1707.912, 'text': 'So here we are, back on the Ubuntu server.', 'start': 1705.751, 'duration': 2.161}, {'end': 1714.796, 'text': "So what we're going to do is we're going to go into the crontab file now to create a backup.", 'start': 1708.433, 'duration': 6.363}, {'end': 1721.24, 'text': 'So all you do, again, is sudo crontab-e.', 'start': 1715.137, 'duration': 6.103}, {'end': 1724.803, 'text': "It's basically crontab edit, and then enter.", 'start': 1721.42, 'duration': 3.383}, {'end': 1732.287, 'text': "Now, if this is your first time entering, like I say, you'll be given a selection of options for the different editors you can use.", 'start': 1725.203, 'duration': 7.084}, {'end': 1735.549, 'text': "I would say you should use vim, because of course, we've been using vim.", 'start': 1732.727, 'duration': 2.822}, {'end': 1741.207, 'text': "Now, to edit in Vim, I'll hit A, so I can now edit this file.", 'start': 1736.365, 'duration': 4.842}, {'end': 1745.609, 'text': 'Now, just to make life easy and show you how this all works.', 'start': 1741.747, 'duration': 3.862}, {'end': 1752.292, 'text': 'I want this backup to happen every minute of every hour of every day of the month, of every month, of every day of the week.', 'start': 1745.609, 'duration': 6.683}, {'end': 1755.333, 'text': "So what I'm going to do is I'm going to do star for minute.", 'start': 1752.652, 'duration': 2.681}, {'end': 1758.895, 'text': 'so this means every minute space star for every hour.', 'start': 1755.333, 'duration': 3.562}], 'summary': 'Creating a backup task in crontab to run every minute.', 'duration': 50.462, 'max_score': 1705.751, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hGqjM9Wz-pU/pics/hGqjM9Wz-pU1705751.jpg'}, {'end': 1887.753, 'src': 'heatmap', 'start': 1855.028, 'weight': 0.844, 'content': [{'end': 1857.329, 'text': 'So basically, the front part of this is the scheduling.', 'start': 1855.028, 'duration': 2.301}, {'end': 1859.229, 'text': 'Like I say, you kind of have to do the math on it.', 'start': 1857.369, 'duration': 1.86}, {'end': 1864.051, 'text': 'Then after that, you just plug in the normal command that you would type in.', 'start': 1859.97, 'duration': 4.081}, {'end': 1868.032, 'text': 'When you are done, of course, you hit Escape to get out of the insert mode.', 'start': 1864.531, 'duration': 3.501}, {'end': 1872.894, 'text': 'Then you do colon wq, which is basically Save and Quit.', 'start': 1868.492, 'duration': 4.402}, {'end': 1876.904, 'text': 'And now that has created the new schedule.', 'start': 1874.122, 'duration': 2.782}, {'end': 1880.287, 'text': "So every minute, it's going to create that backup file.", 'start': 1877.024, 'duration': 3.263}, {'end': 1887.753, 'text': 'Again, with the whole cron process, the server checks the crontab file every minute.', 'start': 1880.547, 'duration': 7.206}], 'summary': 'Explanation of scheduling process and cron job creation with minute intervals.', 'duration': 32.725, 'max_score': 1855.028, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hGqjM9Wz-pU/pics/hGqjM9Wz-pU1855028.jpg'}, {'end': 1911.962, 'src': 'embed', 'start': 1880.547, 'weight': 3, 'content': [{'end': 1887.753, 'text': 'Again, with the whole cron process, the server checks the crontab file every minute.', 'start': 1880.547, 'duration': 7.206}, {'end': 1892.016, 'text': 'So basically, in a minute or two, we should have a new file.', 'start': 1887.993, 'duration': 4.023}, {'end': 1898.742, 'text': "So I'm going to change directory to the backup folder.", 'start': 1892.417, 'duration': 6.325}, {'end': 1901.224, 'text': "So we're now in the backup folder.", 'start': 1899.923, 'duration': 1.301}, {'end': 1901.844, 'text': 'And if I do lsl.', 'start': 1901.244, 'duration': 0.6}, {'end': 1905.921, 'text': 'Oh look, the minute backup has already been created.', 'start': 1903.042, 'duration': 2.879}, {'end': 1911.962, 'text': 'So that is all you have to do to set up scheduled tasks with the crontab file.', 'start': 1906.4, 'duration': 5.562}], 'summary': 'The server checks the crontab file every minute, creating a new backup file within a minute or two to set up scheduled tasks.', 'duration': 31.415, 'max_score': 1880.547, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hGqjM9Wz-pU/pics/hGqjM9Wz-pU1880547.jpg'}, {'end': 2094.797, 'src': 'embed', 'start': 2065.938, 'weight': 6, 'content': [{'end': 2067.84, 'text': 'Do you want to have this happen every minute??', 'start': 2065.938, 'duration': 1.902}, {'end': 2070.181, 'text': 'You can have things run every minute, every hour, et cetera.', 'start': 2067.88, 'duration': 2.301}, {'end': 2072.243, 'text': 'The first five parts are all scheduling.', 'start': 2070.581, 'duration': 1.662}, {'end': 2074.424, 'text': 'And then the final part is simply the command.', 'start': 2072.543, 'duration': 1.881}, {'end': 2082.569, 'text': 'So you type out the whole command and arguments and everything, just like you would normally run if you were sitting down at that little cursor,', 'start': 2074.464, 'duration': 8.105}, {'end': 2084.591, 'text': "if you're sitting down at the command line interface.", 'start': 2082.569, 'duration': 2.022}, {'end': 2085.871, 'text': 'You do that.', 'start': 2085.351, 'duration': 0.52}, {'end': 2093.577, 'text': "If you're using Vim, you do colon WQ, you save the file, and then it'll just work like a champ.", 'start': 2086.532, 'duration': 7.045}, {'end': 2094.797, 'text': 'Cron jobs.', 'start': 2094.077, 'duration': 0.72}], 'summary': 'Explanation on scheduling tasks with cron jobs and using vim for editing.', 'duration': 28.859, 'max_score': 2065.938, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hGqjM9Wz-pU/pics/hGqjM9Wz-pU2065938.jpg'}], 'start': 1625.439, 'title': 'Scheduling and backing up tasks in linux', 'summary': 'Covers scheduling and deleting jobs in linux using the crontab command, editing the crontab file with vim, and emphasizes task scheduling structure. it also includes backing up a directory using tar, setting up scheduled tasks with cron jobs, and creating/executing tasks with the crontab file.', 'chapters': [{'end': 1775.898, 'start': 1625.439, 'title': 'Scheduling jobs in linux with cron', 'summary': 'Explains how to schedule and delete jobs in linux using the crontab command, with a detailed demonstration of using vim to edit the crontab file, and emphasizes the structure for scheduling tasks in ubuntu server.', 'duration': 150.459, 'highlights': ['The chapter demonstrates using the crontab command to schedule and delete jobs in Linux, with a focus on setting the schedule to run a task every Tuesday, and emphasizes the use of Vim to edit the crontab file.', 'It explains the structure for scheduling tasks in the crontab file, detailing the format for specifying the minute, hour, day of the month, month, day of the week, and the command to be executed.', 'The detailed demonstration of using Vim to edit the crontab file and setting the schedule to run a backup every minute of every hour of every day of the month, of every month, of every day of the week is explained.', 'The chapter underscores the importance of understanding how to use a text editor, particularly Vim, for editing the crontab file and provides guidance on selecting Vim as the preferred text editor for the task.']}, {'end': 2126.762, 'start': 1776.398, 'title': 'Backing up and scheduling tasks in linux', 'summary': 'Demonstrates how to back up a directory using tar, set up a scheduled task using cron jobs, and explains the process of creating and executing scheduled tasks with the crontab file.', 'duration': 350.364, 'highlights': ['The chapter demonstrates how to schedule a backup of a directory every minute using the crontab file and the tar command. The demonstration includes setting up a scheduled task using the crontab file to back up a specific directory every minute with the tar command.', 'The process of setting up scheduled tasks with the crontab file is explained, including the command for creating and executing scheduled tasks. The process of creating and executing scheduled tasks with the crontab file is thoroughly explained, highlighting the scheduling component and the command execution.', 'The server checks the crontab file every minute to run scheduled cron jobs as demonstrated in the chapter. The chapter illustrates how the server checks the crontab file every minute and executes scheduled cron jobs as configured.']}], 'duration': 501.323, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/hGqjM9Wz-pU/pics/hGqjM9Wz-pU1625439.jpg', 'highlights': ['The chapter demonstrates using the crontab command to schedule and delete jobs in Linux, with a focus on setting the schedule to run a task every Tuesday, and emphasizes the use of Vim to edit the crontab file.', 'The detailed demonstration of using Vim to edit the crontab file and setting the schedule to run a backup every minute of every hour of every day of the month, of every month, of every day of the week is explained.', 'The chapter underscores the importance of understanding how to use a text editor, particularly Vim, for editing the crontab file and provides guidance on selecting Vim as the preferred text editor for the task.', 'The chapter demonstrates how to schedule a backup of a directory every minute using the crontab file and the tar command. The demonstration includes setting up a scheduled task using the crontab file to back up a specific directory every minute with the tar command.', 'The process of setting up scheduled tasks with the crontab file is explained, including the command for creating and executing scheduled tasks. The process of creating and executing scheduled tasks with the crontab file is thoroughly explained, highlighting the scheduling component and the command execution.', 'The server checks the crontab file every minute to run scheduled cron jobs as demonstrated in the chapter. The chapter illustrates how the server checks the crontab file every minute and executes scheduled cron jobs as configured.', 'It explains the structure for scheduling tasks in the crontab file, detailing the format for specifying the minute, hour, day of the month, month, day of the week, and the command to be executed.']}], 'highlights': ['Cron jobs allow scheduling tasks every hour, minute, week, month, or year, providing the capability to schedule automatic backups of the system.', 'Using TAR, you can easily, quickly, and simply back up files, folders, or the entire system, making it a ubiquitous piece of backup software in the Linux world.', "The 'tar' command is used to create a single backup file from all files and folders.", 'The chapter emphasizes the importance of accurately specifying the exclude command to avoid unexpected inclusions in the backup, as Linux strictly follows the provided commands and does not attempt to interpret user intentions.', "The 'tar' command is used to recover files and folders from a tarball by specifying a different directory for recovery, uncompressing the tarball, and being cautious of overwriting files.", 'The process of setting up cron jobs for scheduling backups in Linux is simplified, requiring the understanding of the scheduling format and command input.', 'The chapter demonstrates using the crontab command to schedule and delete jobs in Linux, with a focus on setting the schedule to run a task every Tuesday, and emphasizes the use of Vim to edit the crontab file.']}