FEATURES OF CREATING A SCRIPT FOR THE BASH SHELL WHEN CREATING BACKUPS
DOI:
https://doi.org/10.32689/maup.it.2023.3.2Keywords:
script, copy, command line, backup copyAbstract
This article provides a bash script for creating backup copies of files and directories. The user interacts with the operating system through a shell. In Linux, there are a number of different shells, the most popular of which is bash itself. Creating a backup copy of data provides an opportunity to restore information in case of loss of the original from which the backup copy was created. At the same time, loss should be understood as the occurrence of an event that led to a change in data, after which they lost their value or were deleted from the medium. The script has the following functions: the script accepts command line parameters, which are the names of the directories to be added to the backup. The command line can be an ideal tool for ensuring cybersecurity. Unbelievable flexibility and absolute accessibility transform the standard commandline interface into a fundamental solution that allows you to quickly create and model complex functions using only one line of pipelined commands. If no parameters are specified, a backup copy of the home directory is created. If no parameters are specified, a backup copy of the home directory is created. If it does not exist, it is created. The current date and time are obtained to be used in the archive name. If command line parameters are specified, the specified directories are added to the backup. The existence of the directory is checked before adding it. The ability to work effectively with the command line is an essential skill for security and administration professionals. Each directory, including its subdirectories, is backed up using the tar command. A message about the created backup copy is displayed along with the path in which it is saved. The article also provides instructions on how to test the functionality of the script and how to set up a periodic run using cron and how to use the command line effectively to improve existing functionality.
References
Види резервного копіювання: повний, інкрементальний та диференціальний бекап. URL: https://www.simnetworks.com/ukr/blog/backup-full-increment-differential
Русин Б. П., Погрелюк Л. В., Висоцька В. А., Осипов М. М., Варецький Я. Ю., і Капшій О. В. Архітектура системи дедублікації та розподілу даних у хмарних сховищах під час резервного копіювання. Інформаційні технології та комп'ютерна інженерія. 2019. Т. 45, Вип. 2. С. 40–63.
Операційні системи: Методичні вказівки до комп’ютерного практикуму: навч. посіб. для студ. спец. 113
«Прикладна математика», 125 «Кібербезпека» / КПІ ім. Ігоря Сікорського ; уклад.: М. В. Грайворонський, В. В. Демчинський. Електронні текстові дані (1 файл: 1,44 Мбайт). Київ : КПІ ім. Ігоря Сікорського, 2021. 74.
Paul Troncone, Carl Albing. Cybersecurity Ops with bash: Attack, Defend, and Analyze from the Command Line 1st Edition. O'Reilly Media 1st edition (April 2, 2019). 504 p. ISBN 978-1492041313.
Jason Cannon. Shell Scripting: How to Automate Command Line Tasks Using Bash Scripting and Shell Programming. CreateSpace Independent Publishing Platform (September 14, 2015). 99 p. ISBN 151738043X.
What are some useful tools or resources for learning and improving your shell scripting skills? URL: https://www.linkedin.com/advice/3/what-some-useful-tools-resources-learning-improving-your-shell
What is a Bash Script? URL: https://ryanstutorials.net/
Steve Parker. Shell Scripting: Expert Recipes for Linux, Bash, and more 1st Edition. Wrox; 1st edition (August 30, 2011), 608 p. ISBN-101118024486.
Shotts, W. E., Book, A. L. (2009). The Linux command line. Lulu. Com, 2009. 555 p.
Гайд для початківців: як писати Shell скрипти URL: https://blog.iteducenter.ua/guides/shell-scripting-forbeginners/