Bob Mottram 11 years ago
parent
commit
a6565af3e4
1 changed files with 81 additions and 30 deletions
  1. 81
    30
      beaglebone.txt

+ 81
- 30
beaglebone.txt View File

@@ -3834,7 +3834,7 @@ The save ane exit.
3834 3834
 Make sure that the database gets backed up.  By using cron if anything goes wrong then you should be able to recover the database either from the previous day or the previous week.
3835 3835
 
3836 3836
 #+BEGIN_SRC: bash
3837
-editor /etc/cron.daily/friendicabackup
3837
+editor /etc/cron.daily/backup
3838 3838
 #+END_SRC
3839 3839
 
3840 3840
 Enter the following
@@ -3842,8 +3842,10 @@ Enter the following
3842 3842
 #+BEGIN_SRC: bash
3843 3843
 #!/bin/sh
3844 3844
 
3845
-MYSQL_PASSWORD=<mysql root password>
3845
+# stop the web server to avoid any changes to the databases during backup
3846
+service apache2 stop
3846 3847
 
3848
+MYSQL_PASSWORD=<mysql root password>
3847 3849
 umask 0077
3848 3850
 
3849 3851
 # Backup the database
@@ -3851,14 +3853,23 @@ mysqldump --password=$MYSQL_PASSWORD friendica > /var/backups/friendica_daily.sq
3851 3853
 
3852 3854
 # Make the backup readable only by root
3853 3855
 chmod 600 /var/backups/friendica_daily.sql
3856
+
3857
+# Backup the database
3858
+#mysqldump --password=$MYSQL_PASSWORD redmatrix > /var/backups/redmatrix_daily.sql
3859
+
3860
+# Make the backup readable only by root
3861
+#chmod 600 /var/backups/redmatrix_daily.sql
3862
+
3863
+# restart the web server
3864
+service apache2 start
3854 3865
 #+END_SRC
3855 3866
 
3856 3867
 Save and exit.
3857 3868
 
3858 3869
 #+BEGIN_SRC: bash
3859
-chmod 600 /etc/cron.daily/friendicabackup
3860
-chmod +x /etc/cron.daily/friendicabackup
3861
-editor /etc/cron.weekly/friendicabackup
3870
+chmod 600 /etc/cron.daily/backup
3871
+chmod +x /etc/cron.daily/backup
3872
+editor /etc/cron.weekly/backup
3862 3873
 #+END_SRC
3863 3874
 
3864 3875
 Enter the following
@@ -3866,18 +3877,15 @@ Enter the following
3866 3877
 #+BEGIN_SRC: bash
3867 3878
 #!/bin/sh
3868 3879
 
3869
-MYSQL_PASSWORD=<mysql root password>
3870
-
3871 3880
 umask 0077
3872 3881
 
3873
-# records go back a couple of weeks
3882
+# Friendica
3874 3883
 cp -f /var/backups/friendica_weekly.sql /var/backups/friendica_2weekly.sql
3884
+cp -f /var/backups/friendica_daily.sql /var/backups/friendica_weekly.sql
3875 3885
 
3876
-# Backup the database
3877
-mysqldump --password=$MYSQL_PASSWORD friendica > /var/backups/friendica_weekly.sql
3878
-
3879
-# Make the backup readable only by root
3880
-chmod 600 /var/backups/friendica_weekly.sql
3886
+# Red Matrix
3887
+#cp -f /var/backups/redmatrix_weekly.sql /var/backups/redmatrix_2weekly.sql
3888
+#cp -f /var/backups/redmatrix_daily.sql /var/backups/redmatrix_weekly.sql
3881 3889
 #+END_SRC
3882 3890
 
3883 3891
 Save and exit.
@@ -3885,8 +3893,25 @@ Save and exit.
3885 3893
 #+BEGIN_SRC: bash
3886 3894
 chmod 600 /etc/cron.weekly/friendicabackup
3887 3895
 chmod +x /etc/cron.weekly/friendicabackup
3896
+editor /etc/cron.monthly/backup
3888 3897
 #+END_SRC
3889 3898
 
3899
+Enter the following
3900
+
3901
+#+BEGIN_SRC: bash
3902
+#!/bin/sh
3903
+
3904
+# Friendica
3905
+cp -f /var/backups/friendica_monthly.sql /var/backups/friendica_2monthly.sql
3906
+cp -f /var/backups/friendica_weekly.sql /var/backups/friendica_monthly.sql
3907
+
3908
+# Red Matrix
3909
+#cp -f /var/backups/redmatrix_monthly.sql /var/backups/redmatrix_2monthly.sql
3910
+#cp -f /var/backups/redmatrix_weekly.sql /var/backups/redmatrix_monthly.sql
3911
+#+END_SRC
3912
+
3913
+Save and exit.
3914
+
3890 3915
 **** Recommended configuration
3891 3916
 ***** Admin
3892 3917
 To get to the admin settings you will need to be logged in with the admin email address which you specified at the beginning of the installation procedure.  Depending upon the theme which you're using "/admin/" will be available either as an icon or on a drop down menu.
@@ -4149,58 +4174,84 @@ service cron restart
4149 4174
 Make sure that the database gets backed up.  By using cron if anything goes wrong then you should be able to recover the database either from the previous day or the previous week.
4150 4175
 
4151 4176
 #+BEGIN_SRC: bash
4152
-editor /etc/cron.daily/redmatrixbackup
4177
+editor /etc/cron.daily/backup
4153 4178
 #+END_SRC
4154 4179
 
4155
-Enter the following
4180
+If you already have a backup script created for Friendica then just uncomment the lines for Red Matrix.  The backup script should look something like the following:
4156 4181
 
4157 4182
 #+BEGIN_SRC: bash
4158 4183
 #!/bin/sh
4159 4184
 
4160
-MYSQL_PASSWORD=<mysql root password>
4185
+# stop the web server to avoid any changes to the databases during backup
4186
+service apache2 stop
4161 4187
 
4188
+MYSQL_PASSWORD=elNYCk3hKE5jCjifUUL6ymP7
4162 4189
 umask 0077
4163 4190
 
4164 4191
 # Backup the database
4192
+mysqldump --password=$MYSQL_PASSWORD friendica > /var/backups/friendica_daily.sql
4193
+
4194
+# Make the backup readable only by root
4195
+chmod 600 /var/backups/friendica_daily.sql
4196
+
4197
+# Backup the database
4165 4198
 mysqldump --password=$MYSQL_PASSWORD redmatrix > /var/backups/redmatrix_daily.sql
4166 4199
 
4167 4200
 # Make the backup readable only by root
4168 4201
 chmod 600 /var/backups/redmatrix_daily.sql
4202
+
4203
+# restart the web server
4204
+service apache2 start
4169 4205
 #+END_SRC
4170 4206
 
4171 4207
 Save and exit.
4172 4208
 
4173 4209
 #+BEGIN_SRC: bash
4174
-chmod 600 /etc/cron.daily/redmatrixbackup
4175
-chmod +x /etc/cron.daily/redmatrixbackup
4176
-editor /etc/cron.weekly/redmatrixbackup
4210
+chmod 600 /etc/cron.daily/backup
4211
+chmod +x /etc/cron.daily/backup
4212
+editor /etc/cron.weekly/backup
4177 4213
 #+END_SRC
4178 4214
 
4179
-Enter the following
4215
+If you already have a backup script created for Friendica then just uncomment the lines for Red Matrix.  The backup script should look something like the following:
4180 4216
 
4181 4217
 #+BEGIN_SRC: bash
4182 4218
 #!/bin/sh
4183 4219
 
4184
-MYSQL_PASSWORD=<mysql root password>
4185
-
4186 4220
 umask 0077
4187 4221
 
4188
-# records go back a couple of weeks
4222
+# Friendica
4223
+cp -f /var/backups/friendica_weekly.sql /var/backups/friendica_2weekly.sql
4224
+cp -f /var/backups/friendica_daily.sql /var/backups/friendica_weekly.sql
4225
+
4226
+# Red Matrix
4189 4227
 cp -f /var/backups/redmatrix_weekly.sql /var/backups/redmatrix_2weekly.sql
4228
+cp -f /var/backups/redmatrix_daily.sql /var/backups/redmatrix_weekly.sql
4229
+#+END_SRC
4190 4230
 
4191
-# Backup the database
4192
-mysqldump --password=$MYSQL_PASSWORD redmatrix > /var/backups/redmatrix_weekly.sql
4231
+Save and exit.
4193 4232
 
4194
-# Make the backup readable only by root
4195
-chmod 600 /var/backups/redmatrix_weekly.sql
4233
+#+BEGIN_SRC: bash
4234
+chmod 600 /etc/cron.weekly/backup
4235
+chmod +x /etc/cron.weekly/backup
4236
+editor /etc/cron.monthly/backup
4196 4237
 #+END_SRC
4197 4238
 
4198
-Save and exit.
4239
+If you already have a backup script created for Friendica then just uncomment the lines for Red Matrix.  The backup script should look something like the following:
4199 4240
 
4200 4241
 #+BEGIN_SRC: bash
4201
-chmod 600 /etc/cron.weekly/redmatrixbackup
4202
-chmod +x /etc/cron.weekly/redmatrixbackup
4242
+#!/bin/sh
4243
+
4244
+# Friendica
4245
+cp -f /var/backups/friendica_monthly.sql /var/backups/friendica_2monthly.sql
4246
+cp -f /var/backups/friendica_weekly.sql /var/backups/friendica_monthly.sql
4247
+
4248
+# Red Matrix
4249
+cp -f /var/backups/redmatrix_monthly.sql /var/backups/redmatrix_2monthly.sql
4250
+cp -f /var/backups/redmatrix_weekly.sql /var/backups/redmatrix_monthly.sql
4203 4251
 #+END_SRC
4252
+
4253
+Save and exit.
4254
+
4204 4255
 **** To access from an Android device
4205 4256
 ***** App
4206 4257
 Open a browser on your device and go to https://f-droid.org/ then download and install the F-Droid apk.  If you then open F-Droid you can search for and install the Friendica app.