
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2023 11:38 AM - edited 09-04-2023 12:00 PM
What is the best way to Preserve the Service Portal FavIcon and Logo on lower instances (Dev, Test, Sand) when performing a Clone Down from Production?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2023 11:59 AM - edited 09-04-2023 12:04 PM
Step 1. Make a note of the sys_id of the actual portal record in your lower instance. (Records in the sys_attachment table point back to this.)
Step 2. Find the relevant records in the sys_attachment table. For a thorough understanding, make a note of the Content Type of each record (png, jpg).
Step 3. Download each attachment, for safekeeping, by clicking on each "File name" link. (Note you can't open these records in Form View like you would other ServiceNow records.) Clicking on each link immediately downloads the entire file.
Step 4. Notice that the downloaded files do NOT have filename extensions.
Step 5. Delete each of the files to confirm that we are working with the right records.
Step 6. Refresh the Logo record to see that the Logo and Icon fields have gotten erased / cleared out. We now know that nothing in the Portal record really points to the sys_attachment table. Rather, it works the other way around. Records in sys_attachment point back to the sp_portal table.
Step 7. Rename each each of the downloaded files and give each one the correct file extension (see step 2).
Step 8. From the portal record, click "Update" for each field, and re-upload the image files.
Step 9. But wait. We forgot the "sys_attachment_doc" table, where the actual image binary data is stored. Add the "sys_attachment.Table sys ID" column to this List View and again put in the sys_id of the portal record, so we can see that these records also point back to the sys_portal table.
Step 10. Now that you know exactly what needs to be preserved across Clone operations, go to your PRODUCTION system, and in table clone_data_preserver, create one record for the sys_attachment table, and one record for the sys_attachment_doc table, each with a condition that the table_sys_id must match the sys_id of your portal record in your target (lower) instance (from step 1). And be sure those 2 records you create are attached to whatever Clone Profile you will be using. The final product should look like this:
Step 11. Perform a clone to your target instance. After the Clone operation is complete, CLEAR YOUR WEB BROWSER CACHE (Ctrl + Shift + D in Chrome) and then verify that the Portal FavIcon and Logo are still correct and as you expect.
Now live happily ever after.
The End.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2023 11:59 AM - edited 09-04-2023 12:04 PM
Step 1. Make a note of the sys_id of the actual portal record in your lower instance. (Records in the sys_attachment table point back to this.)
Step 2. Find the relevant records in the sys_attachment table. For a thorough understanding, make a note of the Content Type of each record (png, jpg).
Step 3. Download each attachment, for safekeeping, by clicking on each "File name" link. (Note you can't open these records in Form View like you would other ServiceNow records.) Clicking on each link immediately downloads the entire file.
Step 4. Notice that the downloaded files do NOT have filename extensions.
Step 5. Delete each of the files to confirm that we are working with the right records.
Step 6. Refresh the Logo record to see that the Logo and Icon fields have gotten erased / cleared out. We now know that nothing in the Portal record really points to the sys_attachment table. Rather, it works the other way around. Records in sys_attachment point back to the sp_portal table.
Step 7. Rename each each of the downloaded files and give each one the correct file extension (see step 2).
Step 8. From the portal record, click "Update" for each field, and re-upload the image files.
Step 9. But wait. We forgot the "sys_attachment_doc" table, where the actual image binary data is stored. Add the "sys_attachment.Table sys ID" column to this List View and again put in the sys_id of the portal record, so we can see that these records also point back to the sys_portal table.
Step 10. Now that you know exactly what needs to be preserved across Clone operations, go to your PRODUCTION system, and in table clone_data_preserver, create one record for the sys_attachment table, and one record for the sys_attachment_doc table, each with a condition that the table_sys_id must match the sys_id of your portal record in your target (lower) instance (from step 1). And be sure those 2 records you create are attached to whatever Clone Profile you will be using. The final product should look like this:
Step 11. Perform a clone to your target instance. After the Clone operation is complete, CLEAR YOUR WEB BROWSER CACHE (Ctrl + Shift + D in Chrome) and then verify that the Portal FavIcon and Logo are still correct and as you expect.
Now live happily ever after.
The End.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2023 09:36 AM - edited 10-10-2023 09:37 AM
Note! This SHOULD work, but IS NOT workings of 10/10/2023, because of ServiceNow Problem PRB1705247.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2024 01:50 AM
Did you find another solution for this? As the documentation on KB1642193 says that the records in the sys_attachment can not be preserved when cloning.