Details
-
Bug
-
Resolution: Fixed
-
Major
-
7.0.1
-
Centos7
7.0.1-5956-enterprise
-
Untriaged
-
1
-
Unknown
Description
To repro:
- create bucket1 and bucket2
- create scope/collections:
- create scope bucket1.scope1;
- create scope bucket2.scope2;
- create collection bucket1.scope1.collection1;
- create collection bucket2.scope2.collection2;
- create UDF:
- CREATE FUNCTION func1() { 0 };
- CREATE FUNCTION default:bucket1.scope1.func1() { 0 };
- CREATE FUNCTION default:bucket2.scope2.func1() { 0 };
- Check system cat:
- select f.identity.name, f.identity.type, f.identity.`scope` from system:functions as f;
- Backup:
- ./cbbackupmgr config -a /backup-1 -r my_backup
- ./cbbackupmgr backup -a /backup-1 -r my_backup -c http://localhost:8091 -u Administrator -p password
- Drop functions:
- drop function default:bucket1.scope1.func1;
- drop function default:bucket2.scope2.func1;
- Restore with exclude
- ./cbbackupmgr restore -a /backup-1 -r my_backup -c http://localhost:8091 -u Administrator -p password --exclude-data bucket2.scope2.collection2
- or
- ./cbbackupmgr restore -a /backup-1 -r my_backup -c http://localhost:8091 -u Administrator -p password --exclude-data bucket2.scope2
- Check system cat:
- select f.identity.name, f.identity.type, f.identity.`scope` from system:functions as f;
Post restore I still see both func1 for scope1 and scope2 present:
cbq> select f.identity.name, f.identity.type, f.identity.`scope` from system:functions as f;
|
{
|
"requestID": "f5a86000-9744-4410-ac02-881a9ecfacc4", |
"signature": { |
"name": "json", |
"scope": "json", |
"type": "json" |
},
|
"results": [ |
{
|
"name": "func1", |
"scope": "scope2", |
"type": "scope" |
},
|
{
|
"name": "func1", |
"scope": "scope1", |
"type": "scope" |
},
|
{
|
"name": "func1", |
"type": "global" |
}
|