How Do I Create a Backup Script in Linux?
Contents

How do I make a backup script in Linux?

For your reference, the operation of the script is as follows:

  1. Backup database using mysqladmin.
  2. Compress database backup.
  3. Send backup to S3.
  4. Loop all the source folders.
  5. Compress the folder.
  6. Send backup to S3.
  7. Delete all files older than 7 days old.

1 нояб. 2016 г.

How do I create a backup directory in Linux?

In order to copy a directory on Linux, you have to execute the “cp” command with the “-R” option for recursive and specify the source and destination directories to be copied. As an example, let’s say that you want to copy the “/etc” directory into a backup folder named “/etc_backup”.

Robert Thorne

Robert Thorne

Automotive & Future Transportation Editor

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.

Share this article
Twitter Facebook Pinterest