Restoring Media links when moving from a hosted site to Synology NAS

Post Reply
Paul Barrett
Posts: 38
Joined: Sun Apr 08, 2018 6:52 pm

Restoring Media links when moving from a hosted site to Synology NAS

Post by Paul Barrett » Mon Apr 23, 2018 7:06 pm

Steve

Another user has pointed me to a WordPress plugin called UpdraftPlus Premium which can not only replicate a WordPress Installation to another server (updating links as it does it, but can also clone other apps too. He uses it specifically to clone his site from the same hosting provider as I use, to a replicate site (not on a Synology NAS). And because it's a WordPress plugin,it can be run from the WordPress dashboard

The gotcha is that the source and target site have to be like for like. i.e if the source is is a multisite network (which it is) then the replica site must also be.

Have you ever tried running WordPress in multisite mode on a Synology NAS, especially alongside other standalone WordPress installs?
Paul Barrett
pfbarrett.uk

Steve
Posts: 63
Joined: Sun Oct 01, 2017 3:08 pm

Re: Restoring Media links when moving from a hosted site to Synology NAS

Post by Steve » Mon Apr 23, 2018 7:31 pm

No I have not.

Paul Barrett
Posts: 38
Joined: Sun Apr 08, 2018 6:52 pm

Re: Restoring Media links when moving from a hosted site to Synology NAS

Post by Paul Barrett » Tue Apr 24, 2018 2:40 am

Looks like I am about to break some new ground then. :) I shall report back.
Paul Barrett
pfbarrett.uk

Steve
Posts: 63
Joined: Sun Oct 01, 2017 3:08 pm

Re: Restoring Media links when moving from a hosted site to Synology NAS

Post by Steve » Tue Apr 24, 2018 9:01 am

If your hosted WordPress and TNG site share the same database it would work. Otherwise Updraft needs the ability to connect to a non-WordPress database.

Did you try using the TNG backup and restore utilities? To use this feature the TNG table prefixes on your host and NAS must be identical. Additionally the host and NAS must have the same media collections. Run a backup on your hosted site by logging into TNG. Go to the admin control panel. Select utilities then click the Select ALL button. From the pull down select BACKUP and then select Go.

Copy all the files from the TNG backup folder on your host to TNG backup folder on your NAS. Open TNG on your NAS and go to the administrator panel. Select utilities then click the Select ALL button. From the pull down select RESTORE and then select Go. All information in the backup will be restored on the NAS.

Paul Barrett
Posts: 38
Joined: Sun Apr 08, 2018 6:52 pm

Re: Restoring Media links when moving from a hosted site to Synology NAS

Post by Paul Barrett » Thu Apr 26, 2018 1:54 am

The problem with using the method you suggest is that I have about 1600 media files to attach. Martin Mosley uses Updraft Plus to replicate his site so we know this should work.
Paul Barrett
pfbarrett.uk

Steve
Posts: 63
Joined: Sun Oct 01, 2017 3:08 pm

Re: Restoring Media links when moving from a hosted site to Synology NAS

Post by Steve » Thu Apr 26, 2018 9:16 am

That’s great let me know how well it works.

Paul Barrett
Posts: 38
Joined: Sun Apr 08, 2018 6:52 pm

Re: Restoring Media links when moving from a hosted site to Synology NAS

Post by Paul Barrett » Fri Apr 27, 2018 1:23 pm

OK, it was going so well, but the import failed for some reason. The vendor suggests looking at the php log to see if there's an error. Do you have any idea whether such a log is available on a Syno NAS and, if so, where is it / how I access it?

They are suggesting it's an IO speed issue which I think is unlikely given that I am basically getting HDD rw speeds via a gigabit LAN connection.

As a comparison I am going to doan All-in-One WP Export / Import and see how that gets on.
Paul Barrett
pfbarrett.uk

Steve
Posts: 63
Joined: Sun Oct 01, 2017 3:08 pm

Re: Restoring Media links when moving from a hosted site to Synology NAS

Post by Steve » Sun Apr 29, 2018 8:26 am

On my DS916+ error logs are located at /var/log/. There are various folders and files in this location. I found php info is stored in /var/log/ as well as /var/log/upstart/. I did not open all the files but I did not see any that appeared to be php error logs.

Apache error logs stored are in /var/log/httpd and there are many other log files for Syno and other programs.

After checking the Synology php settings, the field for error log is blank, apparently by default, since I have never edited this setting.

Image

Edit the error log line and create a log file in a place that is easily accessible and will not be removed during updates.

Image

A Google search did not provide much help on this topic. Synology users that asked where the php error logs are located, did not receive a reply.

Steve
Posts: 63
Joined: Sun Oct 01, 2017 3:08 pm

Re: Restoring Media links when moving from a hosted site to Synology NAS

Post by Steve » Sun Apr 29, 2018 10:43 am

Paul Barrett wrote:
Thu Apr 26, 2018 1:54 am
The problem with using the method you suggest is that I have about 1600 media files to attach. Martin Mosley uses Updraft Plus to replicate his site so we know this should work.
I was under the impression the biggest problem was restoring media links when moving from a host to a NAS. Regardless of whether you clone or copy, all the media files must be present in the correct folders on the NAS. Linking the 1600 media files is not an issue once they are on your NAS, unless you plan to restore them manually.

The TNG GEDCOM import method you tried earlier is typically used when you have media links in a program on a PC that you want to add to a TNG database. In this case the links are stored differently in GEDCOM files so TNG provides a way to remap the links but remapping can get complicated and may require multiple edits to get everything in the correct place. The cloning method may work in some cases but differences in configurations between your NAS and the hosted site can cause problems.

Before reading further, if you CANNOT copy the TNG media folders and files to your NAS then reading the rest of this post will not help.

If you can copy the media to your TNG folder, recreating links is much simpler and easier because the links exist on your hosted site. Simply use the TNG backup/restore utility. This utility is available in the admin control panel. Darrin has done an excellent job making TNG very easy to use in this regard. I have used it many times and have not lost one piece of information. Login to TNG on your host and select Utilities from the Admin Control Panel. Select the Select All button and then Back up from the With selected pull down option and then select Go. It may take a couple of minutes to run if your database is large.

Image

Copy all the TNG backup files from your host to the TNG backup folder on your NAS. Once the files are on your NAS, TNG's backup/restore utility can recreate all the media links from your host database provided the tree ID and file prefixes match those on your NAS. If the tree ID and file prefixes do not match, you will need to manually change the file prefixes which is a pain because there are about 33 files. Unfortunately Windows REName does not support the underscore special character and Synology doesn't support renaming multiple files at the same time. Changing the tree ID is more difficult but I can post instructions to change them if needed.

Once the files are on your NAS and the tree ID and prefixes match, login to TNG on your NAS and select Utilities from the Admin Control Panel. Select the Select All button and then Restore from the With selected pull down option and then select Go. It may take a couple of minutes to run if your database is large.

Image

When restore completes, media links on your host are now on your NAS.

If you want to confirm custom media tables were restored and point to the correct folder, login to the TNG and open the admin control panel. Select an existing media type then select the Edit button. Then select the Make Folder button. If the folder exists you will get the following message:

Image

Click save when finished. Goto TNG Admin -> Media and select any collection, containing media, from the drop down menu and select the search button. The screen should populate with all the media in that collection and show the links. If the media appears but links do not, make sure the tree ID is correct. Media assigned to one tree cannot be linked to people in a different tree.
 
Last edited by Steve on Wed Jul 11, 2018 8:33 pm, edited 1 time in total.

Paul Barrett
Posts: 38
Joined: Sun Apr 08, 2018 6:52 pm

Re: Restoring Media links when moving from a hosted site to Synology NAS

Post by Paul Barrett » Tue May 01, 2018 3:44 pm

Cool. I will try that. Thanks
Paul Barrett
pfbarrett.uk

Post Reply