-
-
Save inspiredearth/783b0cb68b10a20872a1f7017d9a9dea to your computer and use it in GitHub Desktop.
Revisions
-
Jonathan E revised this gist
Aug 18, 2018 . 2 changed files with 7 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,5 @@ WordPress Backups with WP-CLI and TAR =============== The paths used may be server specific. Adjust accordinarly. Simple commands and bash scripts useful for quick backups of Wordpress. This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,7 @@ #!/bin/sh tar -czf ~/wp-backups/plugins-$(date +%Y-%m-%d-%H%M%S).tar.gz ~/httpdocs/wp-content/plugins echo "Plugins backed up. Now doing themes." tar -czf ~/wp-backups/themes-$(date +%Y-%m-%d-%H%M%S).tar.gz ~/httpdocs/wp-content/themes echo "Themes backed up. Now doing database." wp db export - | gzip > ~/wp-backups/db_backup-$(date +%Y-%m-%d-%H%M%S).sql.gz echo "Database backed up" -
Jonathan E revised this gist
Aug 18, 2018 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ #!/bin/sh tar -czf ~/wp-backups/plugins-$(date +%Y-%m-%d-%H%M%S).tar.gz ~/httpdocs/wp-content/plugins tar -czf ~/wp-backups/themes-$(date +%Y-%m-%d-%H%M%S).tar.gz ~/httpdocs/wp-content/themes wp db export - | gzip > ~/wp-backups/db_backup-$(date +%Y-%m-%d-%H%M%S).sql.gz -
hofmannsven revised this gist
Oct 22, 2015 . No changes.There are no files selected for viewing
-
hofmannsven revised this gist
Oct 22, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ WordPress Backups with WP-CLI =============== Related tutorial: https://code64.de/visionerdy/wordpress-backups/ -
hofmannsven revised this gist
Oct 22, 2015 . No changes.There are no files selected for viewing
-
hofmannsven revised this gist
Oct 22, 2015 . 3 changed files with 7 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ 30 18 * * * sh /var/www/backups/backup.sh > /var/www/logs/cronlog 2>&1 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ #!/bin/sh wp db export - | gzip > ./db_backup-$(date +%Y-%m-%d-%H%M%S).sql.gz This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ #!/bin/sh tar --create --gzip --verbose --absolute-names --file=./wp_backup-$(date +%Y-%m-%d-%H%M%S).tar.gz --exclude=*.tar.gz /var/www/websites/wp -
hofmannsven revised this gist
Oct 22, 2015 . 2 changed files with 5 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,2 +1,4 @@ WordPress Backups =============== Blogpost: https://code64.de/visionerdy/wordpress-backups/ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ #!/bin/sh /usr/local/bin/wp db --path=/var/www/websites/wp - | gzip > /var/www/backups/db_backup-$(date +%Y-%m-%d-%H%M%S).sql.gz & tar --create --gzip --absolute-names --file=/var/www/backups/wp_backup-$(date +%Y-%m-%d-%H%M%S).tar.gz --exclude=*.tar.gz /var/www/websites/wp -
hofmannsven created this gist
Oct 22, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,2 @@ TODO =============== This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ #!/bin/sh /usr/local/bin/wp db --path=/vagrant/www/wpse --allow-root export - | gzip > /vagrant/www/backups/db_backup-$(date +%Y-%m-%d-%H%M%S).sql.gz & tar --create --gzip --absolute-names --file=/vagrant/www/backups/wp_backup-$(date +%Y-%m-%d-%H%M%S).tar.gz --exclude=*.tar.gz /vagrant/www/wpse