Yes, but please put those lines in a function and share it between content and backup.
create a common file such that backup and content server will require it.
this file will have functions that will be shared.