Deuteronomy 15:12-13

Release of Debt Slaves

15:12 If your fellow Hebrew – whether male or female – is sold to you and serves you for six years, then in the seventh year you must let that servant go free. 15:13 If you set them free, you must not send them away empty-handed.

Deuteronomy 15:17

15:17 you shall take an awl and pierce a hole through his ear to the door. Then he will become your servant permanently (this applies to your female servant as well).