Database backup and restore for SQL
The SQL backup is the best way to make a backup. In contrast to the OAR/IAR backup performance of OpenSim is hardly affected and present visitors usually don’t notice anything.
Attention! Do not restore from SQL if you downgrade the OpenSim version or if you swap between OpenSim and the Arriba Fork.
To start a backup type in the command line:
mysqldump -uopensim -pMyOpensimPassword --opt --allow_keywords opensim > opensim.sql
Here, the database is called “opensim”, the user account is also called “opensim” and the password is “MyOpensimPassword” as per the example configuration from the server instructions (see respective operating system). The file name of the backup (here “opensim.sql”) is arbitrary. For the backup the limited OpenSim account is sufficient, it is not necessary to log in as root. Having root access to the SQL database is also not required. Backup and Restore are possible during operation, neither the OpenSim software nor the SQL database need to be stopped.
To playback a backup (restore) the following command is used:
mysql -uopensim -pMyOpensimPassword -Dopensim < opensim.sql
Again, neither the OpenSim software nor the SQL database must be stopped for restoring the data. However, the inworld experience of any visitor may get disturbed with suddenly changing landscape or buildings.
If you want to transfer backups to another computer via the Internet or want to save a lot of backups on harddisk, it is worthwhile to compress the files.
pack: gzip
opensim.sql
unpack: gunzip
opensim.sql.gz
Continued: OAR/IAR data backup and restore with OpenSim