1
00:00:00,000 --> 00:00:17,760
Hey guys and welcome back. So what I want to talk to you about in this skill right here

2
00:00:17,760 --> 00:00:25,199
is all around the concepts of backups. Now when we happen to discuss the idea of raids

3
00:00:25,199 --> 00:00:31,119
in a previous skill we understood we could actually survive some type of failure within the system.

4
00:00:31,119 --> 00:00:38,320
This is what the redundancy actually gave us but here is the deal. Raid is not a substitute for a

5
00:00:38,320 --> 00:00:45,039
good backup solution. Indeed if you happen to have a raid array within your office maybe one of the

6
00:00:45,039 --> 00:00:52,000
physical disk breaks and you are okay because the raid array can actually rebuild that data. However

7
00:00:52,000 --> 00:00:58,560
what would happen if your actual whole entire office went on fire then that raid array within

8
00:00:58,560 --> 00:01:04,239
that single location would be destroyed and all of your data would be gone. Instead we want to be

9
00:01:04,239 --> 00:01:10,799
able to have the ability to do some robust backing up. So this is really very very important in fact

10
00:01:10,799 --> 00:01:17,840
I would say it is critical to ensure your data has this backup otherwise it could be lost forever.

11
00:01:17,840 --> 00:01:22,320
This could perhaps be customer data it could be valuable data just to keep your system up and

12
00:01:22,320 --> 00:01:28,159
running a million reasons why you want to have this data backed up. So what I want to do to

13
00:01:28,159 --> 00:01:34,480
introduce this skill is to go through some of the basics around backing up before we actually walk

14
00:01:34,480 --> 00:01:41,520
through the different tools that we can use to do such a thing. So the question would be is what

15
00:01:41,599 --> 00:01:48,399
exactly should you back up because think about it does it make sense to back up absolutely everything

16
00:01:48,399 --> 00:01:54,719
all the time. The reality is this is unlikely to be the case instead you would very likely want to be

17
00:01:54,719 --> 00:02:00,479
selective about what it is you're backing up that means that you only want to back up things which

18
00:02:00,479 --> 00:02:07,519
are important to you that way you are not just needlessly using update of storage instead everything

19
00:02:07,519 --> 00:02:14,319
you back up has value in of itself. So let's discuss some of the directories that we should

20
00:02:14,319 --> 00:02:20,560
actually think about when we're talking about our backups. Now one of the first directories that you

21
00:02:20,560 --> 00:02:26,639
should consider backing up is the home directory. The reason being is that very often given that

22
00:02:26,639 --> 00:02:32,879
this is your home directory this is going to contain many many files which are valuable to you as the

23
00:02:32,879 --> 00:02:38,319
user. Now of course if you only have frivolous information within your home directory you could

24
00:02:38,319 --> 00:02:43,599
in fact skip this directory but the reality is is that this is unlikely to be the case you're

25
00:02:43,599 --> 00:02:49,280
very very more likely indeed to have valuable information stored within this directory so

26
00:02:49,280 --> 00:02:56,159
certainly the home directory should be a candidate for consideration when backing up. Now the next

27
00:02:56,159 --> 00:03:02,639
directory is the user directory now this can be a little bit of a contentious one some people

28
00:03:02,639 --> 00:03:08,800
feel that it is not worth backing up the user directory whereby others absolutely swear by it.

29
00:03:08,800 --> 00:03:15,680
Now the reason why some people would prefer not to actually back up this particular directory

30
00:03:15,680 --> 00:03:22,000
is that the contents of this directory are not likely to change instead this is going to be

31
00:03:22,000 --> 00:03:27,840
stuff that you get from your package manager so if you happen to be on debian and you install

32
00:03:27,840 --> 00:03:33,919
software we're using the apt program or the apt package manager should I say. The argument is

33
00:03:33,919 --> 00:03:40,719
is that it's not so difficult on a new system to simply use that package manager again to pull

34
00:03:40,719 --> 00:03:46,479
those same files that would populate within the user directory so there's not much changes going on

35
00:03:46,479 --> 00:03:53,679
here it's not so difficult to get a working replica of this directory if you so need it so long as you

36
00:03:53,679 --> 00:03:59,280
just remember what it is you have installed on what you need now this last part here is exactly why you

37
00:03:59,280 --> 00:04:04,159
may consider actually backing up this directory because even though you could use something like

38
00:04:04,159 --> 00:04:10,239
say the apt package manager or say for example yum if you're on retat what if you can't remember

39
00:04:10,240 --> 00:04:16,720
all of the software that you had on your system sure if you keep a detailed list of everything

40
00:04:16,720 --> 00:04:21,840
that you have actually installed you could use these package managers to repopulate this user

41
00:04:21,840 --> 00:04:28,079
directory but if you spend the time just to back up this directory then you don't have to worry about

42
00:04:28,079 --> 00:04:34,079
such a thing you just copy it over and everything will be there again now the next directory would be

43
00:04:34,079 --> 00:04:41,120
the etsy directory now this directory has system-wide configuration files and because of this nature

44
00:04:41,120 --> 00:04:48,159
this directory is frequently updated and is changing therefore it does make sense to take a nice

45
00:04:48,159 --> 00:04:53,839
snapshot of this directory in a current working state and include it in your backups as opposed

46
00:04:53,839 --> 00:04:59,519
to again trying to recreate this directory after the fact so like i say whether you're installing

47
00:04:59,519 --> 00:05:05,039
new software or you happen to be making changes to your user account or your group accounts all of

48
00:05:05,039 --> 00:05:12,079
this basic day-to-day administration can alter this file and when something is altered regularly

49
00:05:12,079 --> 00:05:16,959
this can be a signal for you that it is something that you should be considering backing up now the

50
00:05:16,959 --> 00:05:23,359
next one i want to talk to you about is the boot directory now within this directory this is where

51
00:05:23,359 --> 00:05:29,359
you're going to find the kernel now if you happen to be planning to maybe install a new kernel then

52
00:05:29,360 --> 00:05:36,400
is a good idea to ultimately back up this kernel i.e it is a good idea to make a copy of this directory

53
00:05:36,400 --> 00:05:40,960
right here the boot directory where the kernel will actually live that means if you happen to have

54
00:05:40,960 --> 00:05:48,080
some type of error you can quickly roll back and get everything working once again next we have the

55
00:05:48,080 --> 00:05:53,920
bin directory where we keep our binaries now this is one of the decisions that you should actually tie

56
00:05:53,920 --> 00:06:00,319
to the user directory if you choose to back up user then it does make sense to also back up the

57
00:06:00,319 --> 00:06:07,360
bin directory simply puts what you happen to be backing up from the user directory will often rely

58
00:06:07,360 --> 00:06:12,879
on the data that you have within your bin directory so you would like to have some type of parity between

59
00:06:12,879 --> 00:06:19,680
the two if you back up one make sense to back up the other exact same logic with respect to the

60
00:06:19,680 --> 00:06:26,079
sbin directory if we're backing up user the same logic does apply some of the system software that

61
00:06:26,079 --> 00:06:32,800
has been installed in this directory is going to rely on information found in the sbin directory so

62
00:06:32,800 --> 00:06:39,280
don't give yourself unnecessary headaches by backing up this and not having the required files you

63
00:06:39,280 --> 00:06:45,280
need from here if you back up one good idea to back up the other just like with the bin directory

64
00:06:45,279 --> 00:06:52,639
next we have the opt directory we know the opt directory is going to store our add on application

65
00:06:52,639 --> 00:06:59,119
information so realistically if you happen to rely upon a lot of third party software then the

66
00:06:59,119 --> 00:07:05,519
information within the opt directory will be valuable to you thus it would make sense to indeed

67
00:07:05,519 --> 00:07:11,199
back up this directory the reality is though very often people do not choose to back up this

68
00:07:11,279 --> 00:07:15,759
directory again there is no absolute right or wrong answer here this is something where you

69
00:07:15,759 --> 00:07:21,920
have to use your own judgment now we know the var directory is going to have a lot of changes

70
00:07:21,920 --> 00:07:26,879
within it ie this would be something that is difficult to recreate after the fact if we happen

71
00:07:26,879 --> 00:07:34,000
to lose this data say for example we maybe have the var backups directory if we're on a debian

72
00:07:34,000 --> 00:07:40,000
system this is going to contain at package status backups and additional system files

73
00:07:40,000 --> 00:07:47,040
similarly within the var directory we could have our var lib folder this is going to contain

74
00:07:47,040 --> 00:07:52,720
variable information about the state of our applications and our system also we're going to

75
00:07:52,720 --> 00:07:59,600
have var log this is going to contain system and application logging information so again this

76
00:07:59,600 --> 00:08:04,319
could be something that you happen to find very very valuable you want to keep as well as we could

77
00:08:04,319 --> 00:08:11,599
have var mail this would contain all of the local user mail on the system so this is something you

78
00:08:11,599 --> 00:08:17,920
would want to retain again this would be within the var directory and we would also have var

79
00:08:17,920 --> 00:08:25,279
www if you happen to be say for example running a web server the web content from that server you

80
00:08:25,279 --> 00:08:30,399
could find within here so again within the var directory this is something to consider so it

81
00:08:30,399 --> 00:08:35,279
may seem like a home run a var directory is something we absolutely would always want to back

82
00:08:35,279 --> 00:08:40,959
up but this really again is not the case i would say in my opinion it is very likely you would want

83
00:08:40,959 --> 00:08:46,480
to back up this particular directory or perhaps some of the particular subdirectories within the

84
00:08:46,480 --> 00:08:54,079
var directory but again it really does depend on your assessment of the importance of what is within

85
00:08:54,079 --> 00:08:59,120
this particular directory maybe you happen to not be caring about the log file so much

86
00:08:59,120 --> 00:09:04,159
because maybe you're installing a generic desktop computer however if you happen to be on say for

87
00:09:04,159 --> 00:09:09,519
example a server within the system whereby you have tons and tons and tons of logs which are

88
00:09:09,519 --> 00:09:14,480
very very important well it does make sense that that var directory would be included within your

89
00:09:14,480 --> 00:09:21,600
backup strategy now we also have the lib directory this is again something to consider if you happen

90
00:09:21,600 --> 00:09:28,560
to back up that user directory simply put because the operating system libraries will be installed

91
00:09:28,559 --> 00:09:35,759
within this structure in fact it may also actually be within lib 64 depending on the system now these

92
00:09:35,759 --> 00:09:40,799
are some of the locations we should think about with respect to our backups what abouts particular

93
00:09:40,799 --> 00:09:46,319
directories or file systems that you should not back up well again there is never an absolute hard

94
00:09:46,319 --> 00:09:51,759
rule here but this is a general guideline but really information that is not stored on your

95
00:09:51,759 --> 00:09:57,679
actual hard disk such as maybe say a removable usb stick this is not necessarily something you would

96
00:09:57,679 --> 00:10:04,959
have to back up on your local system similarly information that contains temporary data think

97
00:10:04,959 --> 00:10:11,199
about it why would you want to back up data which by design is supposed to be temporary so certain

98
00:10:11,199 --> 00:10:20,079
locations such as the dev directory or the media directory or the mount directory these are directories

99
00:10:20,079 --> 00:10:26,159
and file systems that typically do not need to be backed up also we know we have the proc directory

100
00:10:26,240 --> 00:10:32,639
and the sys directory which are virtual file systems which ultimately are generated within memory

101
00:10:32,639 --> 00:10:38,799
this is transient data relating to things like currently running processes on our system again

102
00:10:38,799 --> 00:10:43,360
this is not information you would want to back up the only time you would actually want to back up

103
00:10:43,360 --> 00:10:48,959
this type of data would be if you wanted to perform some type of forensic investigation into what was

104
00:10:48,959 --> 00:10:55,439
happening on a device at a particular time again this is a very specialized use case and not typical

105
00:10:55,440 --> 00:11:02,560
within a enterprise backup strategy similarly within the var directory we definitely have some

106
00:11:02,560 --> 00:11:08,480
data we would want to back up but actually we probably wouldn't want to back up the var temp

107
00:11:08,480 --> 00:11:14,800
folder because again the data here is specifically designed to be temporary it's not going to have

108
00:11:14,800 --> 00:11:20,080
any value to us in the long term so these are just some of the things that we have to consider with

109
00:11:20,080 --> 00:11:25,520
respect to the location of what it is we should back up but we still have more information to

110
00:11:25,520 --> 00:11:31,360
look at before we go about implementing our backup strategy so what other factors do we have to

111
00:11:31,360 --> 00:11:35,200
consider well that's what we're talking about in the very next nuggets i hope this has been

112
00:11:35,200 --> 00:11:38,560
informative for you and i'd like to thank you for viewing

