Warning: Use of undefined constant PREG_PATTERN_VALID_LANGUAGE - assumed 'PREG_PATTERN_VALID_LANGUAGE' (this will throw an Error in a future version of PHP) in /var/www/kucjica/emperors-wiki/inc/parser/xhtml.php on line 633

Warning: preg_replace(): Delimiter must not be alphanumeric or backslash in /var/www/kucjica/emperors-wiki/inc/parser/xhtml.php on line 633

Warning: Use of undefined constant PREG_PATTERN_VALID_LANGUAGE - assumed 'PREG_PATTERN_VALID_LANGUAGE' (this will throw an Error in a future version of PHP) in /var/www/kucjica/emperors-wiki/inc/parser/xhtml.php on line 633

Warning: preg_replace(): Delimiter must not be alphanumeric or backslash in /var/www/kucjica/emperors-wiki/inc/parser/xhtml.php on line 633

Warning: Use of undefined constant PREG_PATTERN_VALID_LANGUAGE - assumed 'PREG_PATTERN_VALID_LANGUAGE' (this will throw an Error in a future version of PHP) in /var/www/kucjica/emperors-wiki/inc/parser/xhtml.php on line 633

Warning: preg_replace(): Delimiter must not be alphanumeric or backslash in /var/www/kucjica/emperors-wiki/inc/parser/xhtml.php on line 633

Warning: Use of undefined constant PREG_PATTERN_VALID_LANGUAGE - assumed 'PREG_PATTERN_VALID_LANGUAGE' (this will throw an Error in a future version of PHP) in /var/www/kucjica/emperors-wiki/inc/parser/xhtml.php on line 633

Warning: preg_replace(): Delimiter must not be alphanumeric or backslash in /var/www/kucjica/emperors-wiki/inc/parser/xhtml.php on line 633

Warning: Use of undefined constant PREG_PATTERN_VALID_LANGUAGE - assumed 'PREG_PATTERN_VALID_LANGUAGE' (this will throw an Error in a future version of PHP) in /var/www/kucjica/emperors-wiki/inc/parser/xhtml.php on line 633

Warning: preg_replace(): Delimiter must not be alphanumeric or backslash in /var/www/kucjica/emperors-wiki/inc/parser/xhtml.php on line 633

Warning: Use of undefined constant PREG_PATTERN_VALID_LANGUAGE - assumed 'PREG_PATTERN_VALID_LANGUAGE' (this will throw an Error in a future version of PHP) in /var/www/kucjica/emperors-wiki/inc/parser/xhtml.php on line 633

Warning: preg_replace(): Delimiter must not be alphanumeric or backslash in /var/www/kucjica/emperors-wiki/inc/parser/xhtml.php on line 633
rsync-backup

manual backup

(run as sudo)

- local backup

rsync -azvv  --exclude /var/log /etc /home /opt /var  /pathtofolderwherebackupisstored

- remote backup

rsync -azvv -e ssh /foldertobackup remoteuser@remotehost.remotedomain:/wheretostorebackup

https://help.ubuntu.com/community/rsync

to backup mysql database, it is enough to: 

 - stop mysql server

<code>/etc/init.d/mysql stop

- backup the contents of the /var/lib/mysql folder

rsync -azvv /var/lib/mysql /somewhere

- backup the database(s)

mysqldump -u root -ptmppassword --all-databases > /tmp/all-database.sql

source here

automated backup

(as sudo) run crontab:

crontab -e

edit the file, so that cronjob will run the command each 1st of the month, at 20:45

45 20 1 * *  rsync -azvv  --exclude /var/log /etc /home /opt /var  /srv/mis_duplicate/backingup

and backup the server (only folders /etc, /home, /opt, /var) to an external disk

more:

http://rbgeek.wordpress.com/2012/05/22/automatic-backup-from-ubuntu-server-with-rsync/