Synology HyperBackup to Hetzner Storage Box

Its possible to use Hetzner Storage Box as HyperBackup target with the following settings.

Preparations

  • Log in to StorageBox Administration from Hetzner
  • Select StorageBox
  • Create SubAccount (Optional)
    • Activate: Allow SSH
    • Activate: Allow external accessibility
    • User name and password will be displayed after saving (ONLY ONCE!)

Setup

  • Install HyperBackup package
  • Backup destination > File server > rsync
    • ServerType: rsync-compatible server
    • Server name: <uXXXX.your-storagebox.de>
    • Transmission encryption: On
    • Port: 23
    • Username: uXXX-subXXX
    • Password: XXX
    • Backup module: /home/
    • Directory: <backup name>

Run iotop tcpdump etc. on Synology DiskStation or RackStation with Synogear

When you need tools like iotop or tcpdump on you Synology DiskStation or RackStation, you doens't need to itall it via ipkg. Synology had a build in way to install the tools.

  • Connect via SSH to your NAS
  • Run sudo synogear install
  • Now you could use the tools from the list below

The package "Diagnosis Tool" are now also visible in the package center. You could also uninstall it from here, but a installation from package center is not possible.

addr2name
arping
bash
cifsiostat
clockdiff
dig
domain_test.sh
file
fix_idmap.sh
free
fuser
gcore
gdb
gdbserver
iftop
iostat
iotop
iperf
iperf3
kill
killall
ldd
log-analyzer.sh
lsof
ltrace
mpstat
name2addr
ncat
ndisc6
nethogs
nfsiostat-sysstat
nmap
nping
nslookup
peekfd
perf-check.py
pgrep
pidof
pidstat
ping
ping6
pkill
pmap
prtstat
ps
pstree
pwdx
rarpd
rdisc
rdisc6
rltraceroute6
rview
rvim
sa1
sa2
sadc
sadf
sar
sid2ugid.sh
slabtop
sockstat
speedtest-cli.py
strace
sysctl
sysstat
tcpdump
tcpdump_wrapper
tcpspray
tcpspray6
tcptraceroute6
telnet
time
tload
top
tracepath
traceroute6
tracert6
uptime
vim
vimdiff
vmstat
w
watch
xxd

How to easily migrate a Synology EXT4 volume to Btrfs without data loss

Today I switched from a Synology DS215play to a DS918+. Perfect time to change the file system - the DS215play didn't support Btrfs. The migration also works with only one device. So I wrote down both ways.

Steps if you haven't changed your DiskStation

  • Backup your data! If you switch to a device with new drives like me, you still have a copy of your data, but if you migrate without new drives, you don't have a copy! In germany we say: No backup - no pity.
  • Shut down the DS, remove drive 2.
  • Format drive 2 with your computer.
  • Insert drive 2.
  • Turn the DS back on and DO NOT repair the fault volume.
  • Create a new volume (SHR and Btrfs) in the Storage Manager on drive 2.
  • For each shared folder, change the location to the new volume. You can only do this for one shared folder at a time and the move may need several hours depending on the size of your shared folders.
  • When you have moved all the shared folders, shut down your DS and remove drive 1.
  • Format drive 1 with your computer.
  • Turn on your DS and go to the Package Center. Repair all apps.
  • Expand your new volume to drive 1 and wait until RAID Resync is complete. You're done.

Steps if you are switching to a new DiskStation with new drives (my situation)

  • Turn off your old DS, remove drive 2.
  • In the new DS, place the new drives in slot 1 and 2. Place the (old) drive 2 in slot 3.
  • Turn on the new DS. Open your browser and navigate to the new DiskStation. In my case, the DS got a new IP address. I looked them up in my router DHCP table.
  • Follow the Migration Wizard and wait until the DS restarts.
  • Create a new volume (SHA and Btrfs) in the Storage Manager on drive 1 and 2. It is now recommended to change the RAID Resync speed to Fast and wait until RAID synchronization is complete.
  • Now for each shared folder, change the location to the new volume. You can only do this for one shared folder at a time and may need several hours depending on the size of your shared folders.
  • When you have moved all shared folders, shut down your DS and remove drive 3.
  • Turn on your DS and go to the Package Center. Repair all apps. You're Done.

Run command in background on a Synology NAS with nohup

To run a programm  that doesn't quit if you close the ssh session use nohup (no hangup). Attention, you have to run it as root for it to work!

admin@DiskStation:~$ sudo su
Password:
ash-4.3# nohup <command> &

maybe:
ash-4.3# nohup cat /dev/zero | split -b 4095m - /volumeUSB2/usbshare/zeros -d --additional-suffix=.file &

Install IPKG on a Synology DS415play

I search for a easy guid to install ipkg on my Synology DS415play with Intel Atom CPU. I found a guid by Edward P:

Connect to your NAS as root through SSH
Go to a temporary folder, for example:

cd /volume1/@tmp

Download the bootstrap script:

wget http://ipkg.nslu2-linux.org/feeds/optware/syno-i686/cross/unstable/syno-i686-bootstrap_1.2-7_i686.xsh

Make the downloaded script file executable:

chmod +x syno-i686-bootstrap_1.2–7_i686.xsh

Execute the bootstrap script:

sh syno-i686-bootstrap_1.2–7_i686.xsh

Installation should now be completed. To test it, run:

ipkg update

Enjoy.

[via]https://medium.com/@edwardmp/how-to-install-ipkg-on-a-synology-ds415play-nas-14fa94901275[/via]

Erase and overwrite Disk on Synology DiskStation

I wanted to erase and overwrite the data on some hard disks that I need to downgrade my RAID 5 from three 4TB WD Red to only two. The erase function on the webgui doesn't work - something message like "don't possible with your drive". I search and found an alternative:

dd if=/dev/zero of=/dev/sdX bs=1M conv=noerror

To identify the disk use fdisk and/or hdparm:

fdisk -l
hdparm -I /dev/sdX

To run the dd command furthermore after disconnection from the SSH connection, use nohup:

nohup dd if=/dev/zero of=/dev/sdX bs=1M conv=noerror