# How to backup FTP to Synology Station

Having backups of your website or/and ftp server is an important part of administrator’s life. There are multiple ways to…

blog

27 Jan 2016 de

![How to backup FTP to Synology Station](/wp-content/uploads/2016/01/synology1511.jpg)

[Bilder ansehen (18)](#pf-content-image-1-0)

Having backups of your **website** or/and **ftp server** is an important part of administrator's life. There are multiple ways to set it up but our **Client** asked us provide him solution to backup his** ftp files** to his personal **Synology** at home. Synology with it's **full features** offered as standard package is perfect for this scenario.

### 📋 Prerequisites

To prepare **Synology** to get files from an ftp server and store it safely on **Synology** we need to prepare couple of things first.

Login to your **Synology Station**

[!\[Synology DSM desktop after signing in\](/wp-content/uploads/2016/01/img_56a8d8ef360f7.png)](/wp-content/uploads/2016/01/img_56a8d8ef360f7.png)

- Open your **File Station **

[!\[Synology File Station opened from the DSM desktop\](/wp-content/uploads/2016/01/img_56a8d940bf5e7.png)](/wp-content/uploads/2016/01/img_56a8d940bf5e7.png)

- Create **New Shared Folder**

[!\[Create menu in Synology File Station with New Shared Folder selected\](/wp-content/uploads/2016/01/img_56a8d95810dc0.png)](/wp-content/uploads/2016/01/img_56a8d95810dc0.png)

- Pick a name for it according to your prefered standards. In our case it's called **SecureBackups** and we've enabled **Recycle Bin** option (although not necessary it comes useful).

[!\[New Shared Folder dialog for SecureBackups with Recycle Bin enabled\](/wp-content/uploads/2016/01/img_56a8da14518c4.png)](/wp-content/uploads/2016/01/img_56a8da14518c4.png)

- After pressing **OK **we're given an option to choose users who will be able to access the **Shared Folder** (either from **Mac** or **Windows**). This step is not really necessary for the backup itself but our Client wanted to have access to his backups from his **Mac** so he can do verification of content from time to time.

[!\[Synology shared folder permissions wizard showing available users\](/wp-content/uploads/2016/01/img_56a8daa0ea322.png)](/wp-content/uploads/2016/01/img_56a8daa0ea322.png)

- Select proper permissions for the user (in our case **Read/Write** for **admin**)

[!\[Permissions screen granting Read Write access to the admin account\](/wp-content/uploads/2016/01/img_56a8db17bf73d.png)](/wp-content/uploads/2016/01/img_56a8db17bf73d.png)

- After pressing **OK **newly created **share** should be available within **Synology** **File Station**

[!\[SecureBackups shared folder visible in Synology File Station\](/wp-content/uploads/2016/01/img_56a8db7866180.png)](/wp-content/uploads/2016/01/img_56a8db7866180.png)

- The important thing now is to find where the folder **SecureBackups **is actually stored on our **Synology. **Right click on **SecureBackups **and choose **Properties.**

[!\[Context menu for the SecureBackups folder with Properties selected\](/wp-content/uploads/2016/01/img_56a8dbb34da22.png)](/wp-content/uploads/2016/01/img_56a8dbb34da22.png)

- As you can see below our newly **shared directory **is available at **/volume1/SecureBackups**

[!\[Folder properties showing the SecureBackups path on volume1\](/wp-content/uploads/2016/01/img_56a8dc1729618.png)](/wp-content/uploads/2016/01/img_56a8dc1729618.png)

- With that knowledge in mind we can now setup **backup of** **ftp server to Synology**.

### 💾 Solution

In the last step we need to configure a new **Task** in **Task Scheduler **that is available in **Control Panel**

[!\[Synology Control Panel with Task Scheduler highlighted\](/wp-content/uploads/2016/01/img_56a8df10c77c6.png)](/wp-content/uploads/2016/01/img_56a8df10c77c6.png)

- Open **Task Scheduler**

[!\[Task Scheduler window in Synology DSM\](/wp-content/uploads/2016/01/img_56a8df6f2ed9b.png)](/wp-content/uploads/2016/01/img_56a8df6f2ed9b.png)

- Create new Task by pressing **Create** and choosing proper option that's suitable for your scenario. In our case we wanted to run this on **daily basis** so we've choosen **Scheduled** – **User-defined script.** Choose a proper name for the **Task** and switch to next tab

[!\[Create Task dialog configured for a scheduled user-defined script\](/wp-content/uploads/2016/01/img_56a8e075eda99.png)](/wp-content/uploads/2016/01/img_56a8e075eda99.png)

- On next tab you can **schedule** the times of **backup** depending on your needs. I would advise something around 3, where the possibility of **internet** interruption is the lowest.

[!\[Schedule tab showing the daily backup time configuration\](/wp-content/uploads/2016/01/img_56a8e1aa0f3c1.png)](/wp-content/uploads/2016/01/img_56a8e1aa0f3c1.png)

- On the final tab… this is where the magic happens..

[!\[Task settings tab where the backup script is added\](/wp-content/uploads/2016/01/img_56a8e2061164c.png)](/wp-content/uploads/2016/01/img_56a8e2061164c.png)

- As the script we've prepared is very short and doesn't require much work you can simply copy/paste it's content into the box

[!\[User-defined script pasted into the Synology task command box\](/wp-content/uploads/2016/01/img_56a8e694891eb.png)](/wp-content/uploads/2016/01/img_56a8e694891eb.png)

There are 2 lines in the script. The first line is doing mirroring of the currently selected **FTP Server **and putting it's content into **/volume1/SecureBackups. **The 2nd line is responsible for packing that content into **dated.tar.gz** **archives **providing a go back scenario.

```plain
wget -m ftp://:@/* -P /volume1/SecureBackups
tar -zcvf /volume1/SecureBackups/backup-$(date +%Y-%m-%d-%H-%M-%S).tar.gz /volume1/SecureBackups//
```

This little script does couple of nice things:

- It mirrors current structure of the ftp server as found.
- If rerun it compares the content in current folder on Synology with content on ftp and only redownloads the differences.
- It backups current state after the backup is made into dated archive so one can go back in time without much effort.

So after we're happy with how the script looks like we can finish creating our task.

- After pressing **OK **our **task** is saved. To verify it's functionality simply press **Run** and verify it's results.

[!\[Saved Synology backup task ready to be run manually\](/wp-content/uploads/2016/01/img_56a8e577995a8.png)](/wp-content/uploads/2016/01/img_56a8e577995a8.png)

- Confirm choice

[!\[Confirmation dialog before running the Synology backup task\](/wp-content/uploads/2016/01/img_56a8e5e4023aa.png)](/wp-content/uploads/2016/01/img_56a8e5e4023aa.png)

In our case after running a script new folder **.nazwa.pl **(which is hostname of the server we've chosen for backup – in script it's defined as ) is created with proper ftp content. Additionally since we've run the script twice there are 2 backups in form of packed content. **Enjoy**.

[!\[Backed up FTP folder structure created on the Synology share\](/wp-content/uploads/2016/01/img_56a8ea58d899b.png)](/wp-content/uploads/2016/01/img_56a8ea58d899b.png)![Compressed dated backup archives stored in the Synology share](/wp-content/uploads/2016/01/img_56a8e99b2e6ef.png)

## Zugehörige Projekte

Projekte, die zu Tags, Kategorien und Inhalt dieses Beitrags passen.

[Alle Projekte](/de/projekte/)

Projekte werden abgeglichen...

[Zurück zum Blog](/blog)

## Ähnliche Beiträge

- [Recovering a file from linux partition stored on VHDX on Windows 8](/de/blog/recovering-a-file-from-linux-partition-stored-on-vhdx-on-windows-8/)
- [Image Manipulation, Image Resize, Image Combine and more with PowerShell](/de/blog/image-manipulation-image-resize-image-combine-and-more-with-powershell/)
- [Easy way to connect to FTPS and SFTP using PowerShell](/de/blog/easy-way-to-connect-to-ftps-and-sftp-using-powershell/)

<!-- PowerForge markdown artifact sha256:A7ECEF90662B994174860C166FE18F6DA1D1B4A65BF7EAFC38DE1FDA9B01B35C -->
