We'll cover backing things up on a custom schedule and restoring from a backup.
Hit the subscribe button to receive more videos like this!
---
Code:
Timestamps:
0:00 -- What we'll be covering in this video
0:44 -- Sendy is the app we're backing up, which uses MySQL / MariaDB
1:44 -- Using mysqldump to save a compressed version of the database backup
4:00 -- Parsing out DB credentials from a file using grep, cut and sed
8:20 -- Demonstrating how the backup script works when calling it manually
9:32 -- Scheduling the backup to happen once a day with a cron job
12:13 -- Creating a separate backup rotation cron job to delete old backups
14:20 -- Going over how mtime works and how to set a custom time for testing
16:23 -- Creating another script to restore your database
22:02 -- Modifying things for PostgreSQL
22:51 -- When disaster strikes it's nice to have scripts to help restore things quickly
23:30 -- Potentially modifying things to write to block storage or an S3 bucket
Reference links:
(affiliate link)
(affiliate link and you get $100 in credits)
---
Follow along?
Personal Website:
Twitter:
Смотрите видео Automatic MySQL / PostgreSQL Backups with a Shell Script and Cron Job онлайн без регистрации, длительностью 25 минут 10 секунд в хорошем hd качестве. Это видео добавил пользователь Nick Janetakis 15 Август 2020, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 19 тысяч раз и оно понравилось 223 людям.