× NETGEAR will be terminating ReadyCLOUD service by July 1st, 2023. For more details click here.
Orbi WiFi 7 RBE973
Reply

ReadyNAS 422, FW 6.10.4, FTP Backup Solution which deletes Source Files after successful Backup

Worli
Tutor

ReadyNAS 422, FW 6.10.4, FTP Backup Solution which deletes Source Files after successful Backup

Hi, I am searching for a "supported" FTP-Backup solution for my NAS which can automatically delete the source files after successful backup.

 

Today I am doing this via "lftp" (mget -E $FILES) from my Debian Client, sending a WOL to my NAS, Backup to the NAS, deleting the Source Files on Debian, shutting down the ReadyNAS and the Debian.....quite complicated....

 

The data comes from my Hosting Provider via FTP. Due to the limited www-space I have to delete the files asap after backup.

 

An idea/experience? 

 

Kind regards, Worli

Message 1 of 7

Accepted Solutions
StephenB
Guru

Re: ReadyNAS 422, FW 6.10.4, FTP Backup Solution which deletes Source Files after successful Backup


@Worli wrote:

 

 Did you ever hear about "lftp for ReadyNAS"?


No need for an app, as it just installs.

root@RN102:~# apt-get install lftp
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  lftp
0 upgraded, 1 newly installed, 0 to remove and 32 not upgraded.
Need to get 498 kB of archives.
After this operation, 1,709 kB of additional disk space will be used.
Get:1 http://mirrors.edge.kernel.org/debian jessie/main armel lftp armel 4.6.0-1+deb8u1 [498 kB]
Fetched 498 kB in 0s (1,131 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package lftp.
(Reading database ... 18786 files and directories currently installed.)
Preparing to unpack .../lftp_4.6.0-1+deb8u1_armel.deb ...
Unpacking lftp (4.6.0-1+deb8u1) ...
Setting up lftp (4.6.0-1+deb8u1) ...
root@RN102:~# which lftp
/usr/bin/lftp

View solution in original post

Message 4 of 7

All Replies
StephenB
Guru

Re: ReadyNAS 422, FW 6.10.4, FTP Backup Solution which deletes Source Files after successful Backup

You could script something on the debian client that automates what you are doing now.  Or you could create a script on the NAS (using a power schedule to wake it up if you like).

 

Auto-deletion of the source files is a bit scary, as you'd need the scrip to confirm that the files were all transferred sucessfully.  In particular, you'd need to handle the case where the FTP data connection times out.

 

The built-in NAS backup jobs can delete the destination files before the backup runs, but there is no option to delete the source files afterwards.

Message 2 of 7
Worli
Tutor

Re: ReadyNAS 422, FW 6.10.4, FTP Backup Solution which deletes Source Files after successful Backup

I already use a sh-script with highest mode of automation (I guess). Including the Wake-On-LAN to the NAS which works perfectly.

 

But the difficulty is that the Debian Client is not always up and running.Therefore I thought about doing everything directly on the NAS.

May be with  "lftp" provided by third party for the NAS under OS6. Did you ever hear about "lftp for ReadyNAS"?

Message 3 of 7
StephenB
Guru

Re: ReadyNAS 422, FW 6.10.4, FTP Backup Solution which deletes Source Files after successful Backup


@Worli wrote:

 

 Did you ever hear about "lftp for ReadyNAS"?


No need for an app, as it just installs.

root@RN102:~# apt-get install lftp
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  lftp
0 upgraded, 1 newly installed, 0 to remove and 32 not upgraded.
Need to get 498 kB of archives.
After this operation, 1,709 kB of additional disk space will be used.
Get:1 http://mirrors.edge.kernel.org/debian jessie/main armel lftp armel 4.6.0-1+deb8u1 [498 kB]
Fetched 498 kB in 0s (1,131 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package lftp.
(Reading database ... 18786 files and directories currently installed.)
Preparing to unpack .../lftp_4.6.0-1+deb8u1_armel.deb ...
Unpacking lftp (4.6.0-1+deb8u1) ...
Setting up lftp (4.6.0-1+deb8u1) ...
root@RN102:~# which lftp
/usr/bin/lftp
Message 4 of 7
Worli
Tutor

Re: ReadyNAS 422, FW 6.10.4, FTP Backup Solution which deletes Source Files after successful Backup

Hi StephenB,

it looks really good. I installed lftp on my RN422, and created the backup-script. So the dry run (manual start of script) worked perfectly as expected. I created also a crontab-entry. So tomorrow evening I will see whether this also works. But I am absolutely confident...

 

I already thought about this option. But since my big crash some years ago which ended in a complete data loss (finally a file system inconsistency on a RAID-5 system with TBs of data!!!) I am slightly careful and concerned when doing some "manual changes" on the ReadyNAS. But it looks really good.

 

Coming back tomorrow when the crontab-job should be finished. In the meantime thanks a lot and cheers, Worli.

Message 5 of 7
StephenB
Guru

Re: ReadyNAS 422, FW 6.10.4, FTP Backup Solution which deletes Source Files after successful Backup

Software updates could wipe out some of your changes, so you should make sure you keep a copy of the script, etc somewhere else.

 

If the NAS is on a power schedule, it is possible to modify a NAS script to hold off a scheduled power down until your script completes.  The script you'd need to change is /frontview/bin/autopoweroff

Message 6 of 7
Worli
Tutor

Re: ReadyNAS 422, FW 6.10.4, FTP Backup Solution which deletes Source Files after successful Backup

StephenB, finally the test via crontab worked perfectly!!! 

 

Thank you for your very fast help and your additional recommendations.

 

Smiley Very Happy, Worli

Message 7 of 7
Top Contributors
Discussion stats
  • 6 replies
  • 1347 views
  • 2 kudos
  • 2 in conversation
Announcements