Bob Mottram 11 år sedan
förälder
incheckning
a6565af3e4
1 ändrade filer med 81 tillägg och 30 borttagningar
  1. 81
    30
      beaglebone.txt

+ 81
- 30
beaglebone.txt Visa fil

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.
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
 #+BEGIN_SRC: bash
3836
 #+BEGIN_SRC: bash
3837
-editor /etc/cron.daily/friendicabackup
3837
+editor /etc/cron.daily/backup
3838
 #+END_SRC
3838
 #+END_SRC
3839
 
3839
 
3840
 Enter the following
3840
 Enter the following
3842
 #+BEGIN_SRC: bash
3842
 #+BEGIN_SRC: bash
3843
 #!/bin/sh
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
 umask 0077
3849
 umask 0077
3848
 
3850
 
3849
 # Backup the database
3851
 # Backup the database
3851
 
3853
 
3852
 # Make the backup readable only by root
3854
 # Make the backup readable only by root
3853
 chmod 600 /var/backups/friendica_daily.sql
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
 #+END_SRC
3865
 #+END_SRC
3855
 
3866
 
3856
 Save and exit.
3867
 Save and exit.
3857
 
3868
 
3858
 #+BEGIN_SRC: bash
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
 #+END_SRC
3873
 #+END_SRC
3863
 
3874
 
3864
 Enter the following
3875
 Enter the following
3866
 #+BEGIN_SRC: bash
3877
 #+BEGIN_SRC: bash
3867
 #!/bin/sh
3878
 #!/bin/sh
3868
 
3879
 
3869
-MYSQL_PASSWORD=<mysql root password>
3870
-
3871
 umask 0077
3880
 umask 0077
3872
 
3881
 
3873
-# records go back a couple of weeks
3882
+# Friendica
3874
 cp -f /var/backups/friendica_weekly.sql /var/backups/friendica_2weekly.sql
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
 #+END_SRC
3889
 #+END_SRC
3882
 
3890
 
3883
 Save and exit.
3891
 Save and exit.
3885
 #+BEGIN_SRC: bash
3893
 #+BEGIN_SRC: bash
3886
 chmod 600 /etc/cron.weekly/friendicabackup
3894
 chmod 600 /etc/cron.weekly/friendicabackup
3887
 chmod +x /etc/cron.weekly/friendicabackup
3895
 chmod +x /etc/cron.weekly/friendicabackup
3896
+editor /etc/cron.monthly/backup
3888
 #+END_SRC
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
 **** Recommended configuration
3915
 **** Recommended configuration
3891
 ***** Admin
3916
 ***** Admin
3892
 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.
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
 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.
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
 #+BEGIN_SRC: bash
4176
 #+BEGIN_SRC: bash
4152
-editor /etc/cron.daily/redmatrixbackup
4177
+editor /etc/cron.daily/backup
4153
 #+END_SRC
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
 #+BEGIN_SRC: bash
4182
 #+BEGIN_SRC: bash
4158
 #!/bin/sh
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
 umask 0077
4189
 umask 0077
4163
 
4190
 
4164
 # Backup the database
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
 mysqldump --password=$MYSQL_PASSWORD redmatrix > /var/backups/redmatrix_daily.sql
4198
 mysqldump --password=$MYSQL_PASSWORD redmatrix > /var/backups/redmatrix_daily.sql
4166
 
4199
 
4167
 # Make the backup readable only by root
4200
 # Make the backup readable only by root
4168
 chmod 600 /var/backups/redmatrix_daily.sql
4201
 chmod 600 /var/backups/redmatrix_daily.sql
4202
+
4203
+# restart the web server
4204
+service apache2 start
4169
 #+END_SRC
4205
 #+END_SRC
4170
 
4206
 
4171
 Save and exit.
4207
 Save and exit.
4172
 
4208
 
4173
 #+BEGIN_SRC: bash
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
 #+END_SRC
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
 #+BEGIN_SRC: bash
4217
 #+BEGIN_SRC: bash
4182
 #!/bin/sh
4218
 #!/bin/sh
4183
 
4219
 
4184
-MYSQL_PASSWORD=<mysql root password>
4185
-
4186
 umask 0077
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
 cp -f /var/backups/redmatrix_weekly.sql /var/backups/redmatrix_2weekly.sql
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
 #+END_SRC
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
 #+BEGIN_SRC: bash
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
 #+END_SRC
4251
 #+END_SRC
4252
+
4253
+Save and exit.
4254
+
4204
 **** To access from an Android device
4255
 **** To access from an Android device
4205
 ***** App
4256
 ***** App
4206
 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.
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.