WordPress Installation [Part 2 of 3]
The second video in this series provides the basics for you to use WordPress for backups in the workplace.
This new 3-part video series • WordPress Installation... includes step-by-step instructions for a WordPress Installation.
WordPress Installation [Part 1 of 3] • WordPress Installation...
WordPress Installation [Part 2 of 3] • WordPress Installation...
WordPress Installation [Part 3 of 3] • WordPress Installation...
#wordpress #wordpresstutorial #linux
The Linux commands are listed in the description for your convenience.
-----------------------
#!/bin/bash
Name Date 20240423.1330hrs
Backup Script (SQL, FileSystem)
var_date=`date +%Y%m%d`
var_name=`hostname`
Ensure that the backups directory exists
if [ ! -d /opt/backups ]
then
mkdir -p /opt/backups
fi
Do not backup, if the backup exists
Filesystem Backup
if [ ! -e /opt/backups/$var_name.$var_date.filesystem.tar.gz ]
then
tar czf /opt/backups/$var_name.$var_date.filesystem.tar.gz --exclude='/root/.ssh' /etc /root /var/{www,log} --exclude='/var/log/journal' 2_ANGLE_BRACKET_/dev/null
fi
MySQL Backup
if [ ! -e /opt/backups/$var_name.$var_date.wordpress.sql.gz ]
then
mysqldump wordpress | gzip -1 ANGLE_BRACKET /opt/backups/$var_name.$var_date.wordpress.sql.gz
fi
echo -e "$var_date\tLocal Backup Complete" ANGLE_BRACKET /var/log/syslog
-----------------------
Thank you for dropping by!
Subscribe Here:
kzitem.info...
Other Channels:
www.x.com/PaulWPoteete
/ paulwpoteete
CC by Dr. Paul W. Poteete
⏱️Timestamps
00:00 Introduction
00:09 Backup Script
03:25 Define Variables
04:57 Create Directory
06:48 Create Filename
09:07 exclude
10:38 echo
11:38 Change Permissions
12:09 Run Script
13:28 dev null
15:37 msqldump
16:28 gzip
17:50 if then statements
19:23 fi end
19:53 var date
20:38 echo on screen
21:00 Local Backup Complete
21:51 Schedule Backup Times
23:25 Conclusion
Негізгі бет Ғылым және технология WordPress Installation [Part 2 of 3]
Пікірлер