User Tools

Site Tools


en:migrage-tms

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
en:migrage-tms [2022/03/14 14:56]
Денис Цыганов [Restore the dump of database]
en:migrage-tms [2025/03/05 14:41] (current)
Виталий Журавлев
Line 69: Line 69:
 \q \q
 </​code>​ </​code>​
 +
 +=====  Creating and restoring a MongoDB backup =====
 +
 +Create a backup copy of the MongoDB database, using the utility **mongodump**
 +
 +<​code>​
 +mongodump --db images --gzip --archive > /​mongoBackup/​images.dump.gz ​
 +</​code>​
 +
 +Install the MongoDB database on the new server:
 +
 +<​code>​
 +# apt install mongodb-org
 +# systemctl start mongod.service
 +# systemctl enable mongod.service
 +</​code>​
 +
 +Restore a MongoDB backup, using the utility **mongorestore**
 +
 +<​code>​
 +mongorestore --gzip --archive=/​mongoBackup/​images.dump.gz  ​
 +</​code>​
 +
 +:!: If you want to keep statistics, save and restore a backup for the database **content**
 +
 +<​code>​
 +mongodump --db content --gzip --archive > /​mongoBackup/​content.dump.gz ​
 +mongorestore --gzip --archive=/​mongoBackup/​content.dump.gz
 +</​code>​
 +
 +
 ===== Deploy new TMS ===== ===== Deploy new TMS =====
  
en/migrage-tms.txt · Last modified: 2025/03/05 14:41 by Виталий Журавлев