0

Let me give an example. There are two tables:

  • Tbl1 which has columns a(primary key), b, c(foreign key to Tbl2 primary key(column x))
  • Tbl2 which has columns x(primary key), y.

Is it possible to do backup all data of Tbl1 and also include only the necessary data from Tbl2 so it satisfies the Foreign key constraint, and not a full backup of data for Tbl2.

Tbl1

a b c
1 x11111 2
2 x22222 3
3 x33333 4

Tbl2

x y
1 k11111
2 k22222
3 k33333
4 k44444
5 k55555

What I want to be included in the backup is the following:

Tbl1

a b c
1 x11111 2
2 x22222 3
3 x33333 4

Tbl2

x y
1 k11111
2 k22222
3 k33333
4 k44444
5 k55555

From Tbl2 the following rows are not included:

| 1| k11111 | => NOT INCLUDED!

| 5 | k55555 | => NOT INCLUDED!

Nikola
  • 3
  • 2

1 Answers1

3

Is it possible to do backup all data of Tbl1

No. Backups are for the whole DB only. Sadly, you can't backup just selected few tables.

I guess you might be able to copy data elsewhere and then perform the backup, but there is no nice out-of-the-box solution.