Difference between revisions of "Backing up this Wiki"

From frontyard
Jump to: navigation, search
(Created page with "== Backing up this Wiki == This is the research completed at the digital gardening bee 30th June 2018—it is yet to be implemented:<blockquote>1. Use mysqldump to make a bac...")
 
 
Line 1: Line 1:
== Backing up this Wiki ==
 
  
 
This is the research completed at the digital gardening bee 30th June 2018—it is yet to be implemented:<blockquote>1. Use mysqldump to make a backup</blockquote><blockquote>https://www.mediawiki.org/wiki/Manual:Backing_up_a_wiki#Mysqldump_from_the_command_line
 
This is the research completed at the digital gardening bee 30th June 2018—it is yet to be implemented:<blockquote>1. Use mysqldump to make a backup</blockquote><blockquote>https://www.mediawiki.org/wiki/Manual:Backing_up_a_wiki#Mysqldump_from_the_command_line
 
2. You’ll want to save to a different filename every time, e.g.</blockquote><blockquote>nice -n 19 mysqldump -u $USER --password=$PASSWORD $DATABASE -c | nice -n 19 gzip -9 > ~/backup/wiki-$DATABASE-$(date '+%Y%m%d').sql.gz</blockquote><blockquote>You can skip the “nice -n 19” parts of this command, but the useful part is the date.</blockquote><blockquote>3. Test that the backup works</blockquote><blockquote>https://www.mediawiki.org/wiki/Manual:Restoring_a_wiki_from_backup</blockquote><blockquote>I’m not super clear on how to test.</blockquote><blockquote>4. Passwords are hashed and salted, so it’s probably ok. Use scp/sftp to copy, e.g.</blockquote><blockquote>scp wikifile.gz remote.server:~/backups/</blockquote><blockquote>5. You can put all that in a batch script and then use crontab. See</blockquote><blockquote>https://www.mediawiki.org/wiki/User:Flominator/Backup_MW</blockquote>
 
2. You’ll want to save to a different filename every time, e.g.</blockquote><blockquote>nice -n 19 mysqldump -u $USER --password=$PASSWORD $DATABASE -c | nice -n 19 gzip -9 > ~/backup/wiki-$DATABASE-$(date '+%Y%m%d').sql.gz</blockquote><blockquote>You can skip the “nice -n 19” parts of this command, but the useful part is the date.</blockquote><blockquote>3. Test that the backup works</blockquote><blockquote>https://www.mediawiki.org/wiki/Manual:Restoring_a_wiki_from_backup</blockquote><blockquote>I’m not super clear on how to test.</blockquote><blockquote>4. Passwords are hashed and salted, so it’s probably ok. Use scp/sftp to copy, e.g.</blockquote><blockquote>scp wikifile.gz remote.server:~/backups/</blockquote><blockquote>5. You can put all that in a batch script and then use crontab. See</blockquote><blockquote>https://www.mediawiki.org/wiki/User:Flominator/Backup_MW</blockquote>

Latest revision as of 07:06, 26 March 2023

This is the research completed at the digital gardening bee 30th June 2018—it is yet to be implemented:
1. Use mysqldump to make a backup
https://www.mediawiki.org/wiki/Manual:Backing_up_a_wiki#Mysqldump_from_the_command_line 2. You’ll want to save to a different filename every time, e.g.
nice -n 19 mysqldump -u $USER --password=$PASSWORD $DATABASE -c | nice -n 19 gzip -9 > ~/backup/wiki-$DATABASE-$(date '+%Y%m%d').sql.gz
You can skip the “nice -n 19” parts of this command, but the useful part is the date.
3. Test that the backup works
https://www.mediawiki.org/wiki/Manual:Restoring_a_wiki_from_backup
I’m not super clear on how to test.
4. Passwords are hashed and salted, so it’s probably ok. Use scp/sftp to copy, e.g.
scp wikifile.gz remote.server:~/backups/
5. You can put all that in a batch script and then use crontab. See
https://www.mediawiki.org/wiki/User:Flominator/Backup_MW