PG、MySQL、SQLServer、Oracle、DM、Highgo、Oscar、KingBase数据库的备份还原方案
PG&HG:
#备份
./pg_dump -c -d wangshn01 -h ip -p 5432 -U wangshn01 > /home/backup.sql
#还原
./psql -U postgres -h ip -p 5432 -d wangshn01 -f /home/backup.sql
SQLServer:
https://blog.csdn.net/gc_2299/article/details/80793185
Oracle:
#备份
expdp test01/aaaaaa@ip/servicename directory=dir schemas=test dumpfile=20210525.dump logfile=20210525.log
#还原
impdp test02/aaaaaa@ip/servicename directory=dir dumpfile=20210525.DUMP logfile=20210525.log remap_tablespace=test01:test02 remap_schema=test01:test02 table_exists_action=replace
DM:
#备份
./dexp wangshn01/\”Test1027?\!\”@ip file=/home/test01.dmp log=/home/daochu.txt
#还原
./dimp wangshn01/\”Test1027?\!\”@ip fromuser=wangshn01 touser=wangshn01 table_exists_action=replace file=/home/wangshn01.dmp log=/home/daoru.txt
MySQL:
#备份
mysqldump -hip -uroot -ppassword –skip-lock-tables wangshn01 > /home/wangshn01.sql
#还原
mysql -hip -uroot -ppassword wangshn01 < /home/wangshn01.sql
Oscar:
#备份
./osrexp -usysdba/”password” -hip -p2003 -dOSRDB level=schema file=/home/wangshn01.osr log=/home/wangshn01.log schema=wangshn01
#还原
./osrimp -usysdba/”password” -hip -p2003 -dosrdb level=schema file=/home/wangshn01.osr log=/home/wangshn01.log schema=wangshn01 ignore=true nocheckvalidate=true
KB:
工具备份还原