Last week I had the chance to lay my hands on two 3TB Seagate disks as a replacement for my old Western Digital Green 1TB disks currently in use for my Synology DS212j NAS. The 1TB disks currently installed in the DS212j NAS are in a RAID1 configuration and there several articles that explain how to upgrade your disks. I read some articles and according to some of these articles the first step should be to creating a Synology backup of the old 1TB disk on a larger disk. Good read stuff is:





Step 1: Shutdown the Synology NAS and replace one of the 1TB disks with a larger disk (in my case the 3TB disk). Startup the Synology NAS and create a new volume (Volume 2) on the newly added disk. Start the Synology Backup & Replication tool and create a full backup to the newly created volume.



In my case this took a long time (depending on the diskusage and disksize) but ended succesfully. Even the database, MariaDB, looked fine. NOT! (as I discovered later at restore).



Serendepity / S9Y: on my Synology DS212J I've installed Serendipity / S9Y as my blogging software. I find this software very robust en fast, easy to use and well supported. It comes with a plugin architecture which includes social media plugins, markup plugins, sidebar and event plugins and... even a backup plugin! This plugin was my rescue. Although I had to make a lot of manual steps, I managed to get my sites up-and-running again. How? Read below.


Step 2: after the Synology Backup & Replication succeeded I powered off the Synology NAS. I then replaced the last old 1TB disk with a 3TB disk and powered the Synology back on. After creating a new volume Volume 1 I started the restore action using the same Synology Backup & Replication tool which can take a long time to complete depending on the size of the backup.



At the end of the restore action I saw the MariaDB restore action failed, leaving me with no websites at all :( At this time i thought about restoring the old disks to create a backup of the MariaDB database using the PHPMyAdmin interface. Suddenly i realized the Serendipity backup plugin creates a daily backup of all my website databases!



Step 3: I located the last backups and copied them to a local drive. The backups were in a .tar.gz format and I extracted the SQL files within using 7ZIP. The backup contains two sorts of files, create SQL files (the layout of the tables) and insert SQL files (the data whihin the tables), and I placed them in two seperate directories. I combined all create SQL files into one large create SQL file.



I then opened the PHPMyAdmin interface, created the correct database and associated database user and opened the database. It is importand to use the exact database name and associated username, otherwise Serendipity won't connect to the database. The database, database user and database password can be found in the serendipity_config_local.inc.php file. I imported the combined Create SQL file and by then I had a correct but empty database. To fill the database tables just import all the insert SQL files.




  • Some of them are empty ones which will generate an error so it's better to skip the empty insert SQL files;

  • Some of the insert SQL files will generate a warning, just ignore them and check the table after inserting the data.



Repeat Step 3 for every database and site you host on the Synology NAS.



Oh oh, i'm still running whithout RAID1 protection! To enable RAID1, delete the backup volume Volume 2 and create a new RAID1 set on Volume 1. Mirrorring the disks will take a long time, depending on the disk size.



And so, after 2½ days work, the 1TB disks are replaced by 3TB disks and everything is it was before, only with more free space.


No comments

The author does not allow comments to this entry