Changes

From Amahi Wiki
Jump to: navigation, search
m
</blockquote>
* Find the "logfile" line and change to the line item. The rsnapshot log file will be kept under the "backups" directory.
<blockquote>
</blockquote>
* Find the "BACKUP POINTS / SCRIPTS" section. Add changes as seen below. This is the section that defines the "key directories" source that will be backed up. See the "owncloud/" at the end of each line? Remember the previous "green" server folder? This is where the ownCloud binaries and physical files will be stored.
<blockquote>
</blockquote>
* Next find the line "" change as shown below. This set the location where the ownCloud "database dump" backup will be kept. Also the line shows the execution path for the database backup program script file that performs the database backup. <blockquote>{{Text|Text=backup_script /usr/local/bin/backup_mysql.sh owncloud/database_dump}}</blockquote> * Save the "rsnapshot.conf" file and return to the command-line prompt. * Next database backup program script file has to be set up. * Copy database backup script to the "/usr/local/bin/". <blockquote>{{Code|cp /usr/share/doc/rsnapshot/examples/utils/backup_mysql.sh /usr/local/bin/}}</blockquote> * Go to the "/usr/local/bin/" directory and set the script file permissions and ownership. <blockquote>{{Code|cd /usr/local/bin/chown root:root /usr/local/bin/backup_mysql.shchmod 754 /usr/local/bin/backup_mysql.sh}}</blockquote> * Edit the "backup_mysql.sh" file. * Find the line "backup the database" and add the line has shown below. This will be the command that will be issued to do the database backup. The database dump file will be called "owncloud_db.sql". <blockquote>{{Text|Text=/usr/bin/mysqldump -uowncloud -powncloud owncloud > owncloud_db.sql}}</blockquote> * Find the line "# make the backup readable only by root" and add the line shown below. <blockquote>{{Text|Text=/bin/chmod 600 owncloud_db.sql}}</blockquote> * Save the "backup_mysql.sh" file and return to the command-line prompt.  * There rsnapshot is configured to backup ownCloud.
=== Test ===