IMPORTANT: Per accedir als fitxer de subversion: http://acacha.org/svn (sense password). Poc a poc s'aniran migrant els enllaços. Encara però funciona el subversion de la farga però no se sap fins quan... (usuari: prova i la paraula de pas 123456)

Còpies de seguretat consistents

Un exemple de còpia consistent podria ser el següent:

# umount /home
# mount -o ro /home
# tar -cvf /dev/st0 /home
# umount /home
# mount -o rw /home

El problema és que la partició home deixa d'estar disponible durant la copia.

Còpia de seguretat de MySQL

TODO

Login to your MySQL server:

# mysql -u root -p

At mysql prompt type the following command to closes all open tables and locks all tables for all databases with a read lock until you explicitly release the lock by executing UNLOCK TABLES. This is very convenient way to get backups if you have a file system such as Veritas or Linux LVM or FreeBD UFS that can take snapshots in time.

mysql> flush tables with read lock;
mysql> flush logs;
mysql> quit;

Now type the following command (assuming that your MySQL DB is on /dev/vg01/mysql):

# lvcreate --snapshot –-size=1000M --name=backup /dev/vg01/mysql

Again, login to mysql:

# mysql -u root -p

Type the following to release the lock:

mysql> unlock tables;
mysql> quit;

Now, move backup to tape or other server:

# mkdir -p /mnt/mysql
# mount -o ro /dev/vg01/backup /mnt/mysql
# cd /mnt/mysql
# tar czvf mysql.$(date +"%m-%d%-%Y).tar.gz mysql
# umount /mnt/tmp
# lvremove -f /dev/vg01/backup

If you are using a Veritas file system, you can make a backup like this (quoting from the official MySQL documentation):

Login to mysql and lock the tables:

mysql> FLUSH TABLES WITH READ LOCK;
mysql> quit;

Type the following at a shell prompt

# mount vxfs snapshot

Now UNLOCK TABLES:

mysql> UNLOCK TABLES;
mysql> quit;

Vegeu també

Enllaços externs