Owncloud » Historie » Version 4
Jeremias Keihsler, 13.01.2017 18:28
1 | 1 | Jeremias Keihsler | h1. Install |
---|---|---|---|
2 | |||
3 | * [[owncloud_server_install|install]] |
||
4 | |||
5 | h1. Basic Setup |
||
6 | |||
7 | 2 | Jeremias Keihsler | * [[owncloud_server_setup|basic setup]] |
8 | 1 | Jeremias Keihsler | |
9 | h1. Extended Setup |
||
10 | |||
11 | h2. SELinux secured server |
||
12 | |||
13 | * see also https://doc.owncloud.org/server/9.1/admin_manual/installation/selinux_configuration.html |
||
14 | |||
15 | h2. SSL secured web-server |
||
16 | |||
17 | * see also http://wiki.centos.org/HowTos/Https |
||
18 | |||
19 | h2. configure outgoing mail |
||
20 | |||
21 | * [[owncloud_server_setup_outgoing_mail|configure outgoing mail]] |
||
22 | |||
23 | h1. bug-fix |
||
24 | |||
25 | 3 | Jeremias Keihsler | at least in our environment sending mails does not work out of the box. @mail.php@ needs to be fixed. See also [[owncloud_server_setup_outgoing_mail|configure outgoing mail]] |
26 | 1 | Jeremias Keihsler | |
27 | h1. Client Integration |
||
28 | |||
29 | [[owncloud_client_setup_thunderbird]] |
||
30 | |||
31 | h1. improve performance |
||
32 | |||
33 | you may look up the performance thread in the owncloud-forum https://forum.owncloud.org/viewtopic.php?f=8&t=10692 |
||
34 | |||
35 | [[owncloud_server_setup_cron|setup cron.php-job ]] |
||
36 | |||
37 | to check the logs of owncloud more easily you may want to make a symbolic link to the admin-files |
||
38 | <pre><code class="bash"> |
||
39 | ln -s /var/www/html/owncloud/data/owncloud.log /var/www/html/owncloud/data/admin/files/owncloud.log |
||
40 | </code></pre> |
||
41 | h1. Migrate from SQLite3 to MySQL |
||
42 | |||
43 | * [[owncloud_server_migrate_SQLite3_to_MySQL]] |
||
44 | |||
45 | h1. Backup/Restore |
||
46 | |||
47 | a very interesting article is https://wiki.amahi.org/index.php/Backup_and_Recovery_of_ownCloud |
||
48 | |||
49 | h2. Backup DB |
||
50 | |||
51 | h3. SQLite |
||
52 | |||
53 | While SQLite-DB consists of just one file, you shouldn't just copy the file. It might be corrupted by doing so. |
||
54 | |||
55 | If you want to copy the DB-file you might want to (taken from http://stuvel.eu/blog/55/safely-copy-a-sqlite-database) |
||
56 | <pre><code class="bash"> |
||
57 | shell$ sqlite3 some.db |
||
58 | sqlite> begin immediate; |
||
59 | <press CTRL+Z> |
||
60 | shell$ cp some.db some.db.backup |
||
61 | shell$ exit |
||
62 | sqlite> rollback; |
||
63 | </code></pre> |
||
64 | |||
65 | the other way may be dumping the DB. This is easily done by |
||
66 | <pre><code class="bash"> |
||
67 | sqlite3 sample.db .dump > sample.bak |
||
68 | </code></pre> |
||
69 | |||
70 | based on the rsnapshot-backup-script for postgresql following script might be invoked by rsnapshot |
||
71 | 2 | Jeremias Keihsler | <pre> |
72 | 1 | Jeremias Keihsler | ############################################################################## |
73 | # backup_sqlite.sh |
||
74 | # |
||
75 | # by Jeremias Keihsler <j@keihsler.com> |
||
76 | # http://www.keihsler.com/ |
||
77 | # |
||
78 | # based on the backup_pgsql.sh script |
||
79 | # by Nathan Rosenquist <nathan@rsnapshot.org> |
||
80 | # |
||
81 | # This is a simple shell script to backup a SQLite database with rsnapshot. |
||
82 | # |
||
83 | # The assumption is that this will be invoked from rsnapshot and also that it |
||
84 | # will run unattended. |
||
85 | # |
||
86 | # This script simply needs to dump a file into the current working directory. |
||
87 | # rsnapshot handles everything else. |
||
88 | ############################################################################## |
||
89 | |||
90 | umask 0077 |
||
91 | |||
92 | # backup the database |
||
93 | /usr/bin/sqlite3 /var/www/html/owncloud/data/owncloud.db .dump > owncloud_dumpall.sql |
||
94 | |||
95 | # make the backup readable only by root |
||
96 | /bin/chmod 600 owncloud_dumpall.sql |
||
97 | </pre> |
||
98 | |||
99 | h2. Backup Files |
||
100 | |||
101 | as the "files" are not stored in the database but in the filesystem you also need to make a backup of those. Maybe the easiest way is to completely save the whole @owncloud@ folder-structure via rsnapshot. |
||
102 | |||
103 | Following line may be added to rsnapshot.conf |
||
104 | <pre><code class="bash"> |
||
105 | backup /var/www/html/owncloud localhost/ |
||
106 | backup_script /usr/local/bin/backup_sqlite.sh localhost/sqlite/ |
||
107 | </code></pre> |
||
108 | 4 | Jeremias Keihsler | |
109 | 1 | Jeremias Keihsler | h2. Restore DB |
110 | |||
111 | h3. SQLite |
||
112 | |||
113 | <pre><code class="bash"> |
||
114 | mv sample.db sample.db.old |
||
115 | sqlite3 sample.db < sample.bak |
||
116 | </code></pre> |
||
117 | |||
118 | h1. mount web_dav |
||
119 | |||
120 | This requires @davfs2@-package |
||
121 | <pre><code class="bash"> |
||
122 | mount.davfs -o dir_mode=775 https://example.com/owncloud/remote.php/webdav /mnt/owncloud_dav/ |
||
123 | </code></pre> |