How to Delete a Folder created in CACHEDEV1_DATA with path pointing to root /

Discussion about using NAS on Linux and Unix OS.
PeeBee
Starting out
Posts: 11
Joined: Tue May 30, 2017 10:54 am

How to Delete a Folder created in CACHEDEV1_DATA with path pointing to root /

Post by PeeBee » Mon Mar 02, 2020 6:46 am

Hi All,
I have an issue after creating a folder called root under File Station with path / this shared folder is sitting in CACHEDEV1_DATA but point back to / path
so it does not appear in CACHEDEV1_DATA. 9 see attached pic of Folders Root and Root2 there is no Folders to delete

I did this for a complete backup in one go to external drive ... but now how to delete this Folder from SSH ? as my File Station now shows no folders ..
which I understand ...I should have left my session to File Station Open anyway
any help appreciated to do this safely
regards Peter
You do not have the required permissions to view the files attached to this post.

User avatar
OneCD
Ask me anything
Posts: 7773
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: How to Delete a Folder created in CACHEDEV1_DATA with path pointing to root /

Post by OneCD » Mon Mar 02, 2020 7:04 am

Hi Peter and welcome to the forum. :)
PeeBee wrote:
Mon Mar 02, 2020 6:46 am
but now how to delete this Folder from SSH ?
This will remove only the problem symlinks and leave everything else alone:

Code: Select all

rm /share/Root*
But, if you created these as shares via File Station, you'll need to remove the sharing configuration from QTS. This is stored in [/etc/config/smb.conf].

The easiest way might be to navigate to user share management in your QTS Control Panel, delete your 'Root' and 'Root2' shares, but ensure you don't let your NAS delete the data contained within each share (there's a checkbox for this on the confirmation dialog).

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

PeeBee
Starting out
Posts: 11
Joined: Tue May 30, 2017 10:54 am

Re: How to Delete a Folder created in CACHEDEV1_DATA with path pointing to root /

Post by PeeBee » Mon Mar 02, 2020 3:48 pm

Hi OneCd,
First thanks for your reply,
and your guidance where things I have now changed and are located ...you mention the QTS User Share management in Control panel ....there is the problem as my web browser interface through QTS my original QTS interface screen has now been changed to I think the original setup 4 icons File station Control Panel but I do not see of my folders /Files / any data in any Panel at the moment so I figure I might do this with SSH and nano to remove references to Root and Root2 as you suggested I have made a backup copy smb.cong.BUP ....Now the 2 entries for Root2 and Root are the end of config file if I edit these out leave the ~ TILDE END OF FILE MARKER and then reboot Qnap will this be a safe move ? Not end up destroying anything else let me know your thoughts on this before I try it.
Thanks
regards Peter
smb.conf.jpg
You do not have the required permissions to view the files attached to this post.

User avatar
OneCD
Ask me anything
Posts: 7773
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: How to Delete a Folder created in CACHEDEV1_DATA with path pointing to root /

Post by OneCD » Mon Mar 02, 2020 4:03 pm

PeeBee wrote:
Mon Mar 02, 2020 3:48 pm
I have made a backup copy smb.cong.BUP
Ah, close enough... ;)

Where did you place the backup file? If it's in [/etc/config], that's OK.
PeeBee wrote:
Mon Mar 02, 2020 3:48 pm
... Now the 2 entries for Root2 and Root are the end of config file if I edit these out ...
Exactly right. Remove the whole of the config block (all lines) for both shares.
PeeBee wrote:
Mon Mar 02, 2020 3:48 pm
... leave the ~ TILDE END OF FILE MARKER ...
I doubt there's really a tilde there as the EOF (that wouldn't fit QNAP's existing method for configuration file layouts), it looks more like a display "helper".
PeeBee wrote:
Mon Mar 02, 2020 3:48 pm
... and then reboot Qnap will this be a safe move ? Not end up destroying anything else let me know your thoughts on this before I try it.
Yep, sounds fine. But, ensure whichever editor you use handles Unix line-endings correctly. :geek:

If this may be a problem, those blocks can be removed with these BASH commands:

Code: Select all

rmcfg Root -f /etc/config/smb.conf
rmcfg Root2 -f /etc/config/smb.conf

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

PeeBee
Starting out
Posts: 11
Joined: Tue May 30, 2017 10:54 am

Re: How to Delete a Folder created in CACHEDEV1_DATA with path pointing to root /

Post by PeeBee » Mon Mar 02, 2020 5:05 pm

Hey OneCD those bash commands ......NICE ! I used them checked the smb.conf ....perfect and rebooted ..... I am back up and running thanks :-) now I did not use the command rm /Share/Root* command for symlinks do you think I need too?
also you asked yes I save the backup to the /etc/config folder as smb.conf.BUP this is okay Yes?


and while I have you after creatign the / root folder
i ran

Code: Select all

sudo rsync -uvaE --progress --dry-run --ignore -exisitng --exclude ",*" --exclude Claudia /share/CACHEDEV1_DATA  /share/external/DEV3301_1/CACHEDEV1_DATA
straight to a External USB 3 10 tb Hard drive to back up whole QNAP NAS in one go (this worked ) early this year

now I want to do an incremental update.. meaning just update the Newer files on NAS is this the best approach or do you have a better way ?

cheers Peter
Last edited by PeeBee on Mon Mar 02, 2020 5:15 pm, edited 1 time in total.

User avatar
OneCD
Ask me anything
Posts: 7773
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: How to Delete a Folder created in CACHEDEV1_DATA with path pointing to root /

Post by OneCD » Mon Mar 02, 2020 5:12 pm

You’ll only need to remove the symlinks if they still exist.

From memory, QTS recreates them on each boot-up from the contents of [/etc/config/smb.conf].

Now that you’ve removed those shares and rebooted, the symlinks shouldn’t be there anymore.

Yes, your backup filename and location are fine. :D

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

PeeBee
Starting out
Posts: 11
Joined: Tue May 30, 2017 10:54 am

Re: How to Delete a Folder created in CACHEDEV1_DATA with path pointing to root /

Post by PeeBee » Mon Mar 02, 2020 5:27 pm

okay thank you very much for all your help

and while I have you after creating the / root folder
I ran this command:

Code: Select all

sudo rsync -uvaE --progress --dry-run --ignore -exisitng --exclude ",*" --exclude Claudia /share/CACHEDEV1_DATA  /share/external/DEV3301_1/CACHEDEV1_DATA
straight to a External USB 3 10 tb Hard drive to back up whole QNAP NAS in one go (this worked ) early this year

now I want to do an incremental update.. meaning just update the Newer files on NAS is this the best approach or do you have a better way ?

cheers Peter

User avatar
OneCD
Ask me anything
Posts: 7773
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: How to Delete a Folder created in CACHEDEV1_DATA with path pointing to root /

Post by OneCD » Tue Mar 03, 2020 4:11 am

PeeBee wrote:
Mon Mar 02, 2020 5:27 pm
I ran this command:

Code: Select all

sudo rsync -uvaE --progress --dry-run --ignore -exisitng --exclude ",*" --exclude Claudia /share/CACHEDEV1_DATA  /share/external/DEV3301_1/CACHEDEV1_DATA
straight to a External USB 3 10 tb Hard drive to back up whole QNAP NAS in one go (this worked ) early this year

now I want to do an incremental update.. meaning just update the Newer files on NAS is this the best approach or do you have a better way ?
If you can, use the Hybrid Backup Sync app available for QTS.

If you'd prefer to run 'rsync' manually, suggest studying the manual. :geek:
  • 'sudo': you won't need this if you login via SSH as the 'admin' user.
  • '--dry-run': nothing will actually happen if you specify this. Use it for testing, then remove it when the file list to be synced appears correct.
  • '--ignore -exisitng': this is a typo. Should be '--ignore-existing'.
  • '/share/external/DEV3301_1/CACHEDEV1_DATA': the assignment of DEV3301_1 is not assured. Try labeling your external drives. This will give you a predictable mount-point.
'rsync' will (by-default) only update without sending everything again. So, subsequent executions usually occur faster than the initial sync. It depends on the amount of data that has changed.

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

PeeBee
Starting out
Posts: 11
Joined: Tue May 30, 2017 10:54 am

Re: How to Delete a Folder created in CACHEDEV1_DATA with path pointing to root /

Post by PeeBee » Tue Mar 03, 2020 4:57 am

Good Morning
and thanks for the education appreciate it .....see my comments below in green ....
OneCD wrote:
Tue Mar 03, 2020 4:11 am
PeeBee wrote:
Mon Mar 02, 2020 5:27 pm
I ran this command:

Code: Select all

sudo rsync -uvaE --progress --dry-run --ignore -exisitng --exclude ",*" --exclude Claudia /share/CACHEDEV1_DATA  /share/external/DEV3301_1/CACHEDEV1_DATA
straight to a External USB 3 10 tb Hard drive to back up whole QNAP NAS in one go (this worked ) early this year

now I want to do an incremental update.. meaning just update the Newer files on NAS is this the best approach or do you have a better way ?
If you can, use the Hybrid Backup Sync app available for QTS. ( I have tried this but for my inital backup but I could not do it in one complete backup job, I had to setup 5 different jobs, unless I set the backup process up incorrectly ?) if not then that means you can not set and forget when doing incremtal backups ... you would have to run though every job and start it after previous job has finished ?

If you'd prefer to run 'rsync' manually, suggest studying the 'rsync' manual. :geek: ***(thanks for This Link i will do some reading)
  • 'sudo': you won't need this if you login via SSH as the 'admin' user. (Thanks !)
  • '--dry-run': nothing will actually happen if you specify this. Use it for testing, then remove it when the file list to be synced appears correct. (Yes sorry pasted this from notepad backup of command ... I just keep --dry-run as a safety check before running) :oops:
  • '--ignore -exisitng': this is a typo. Should be '--ignore-existing'. (Yes Sorry I fixed this when I ran it ...but sharp eyes ) :oops:
  • '/share/external/DEV3301_1/CACHEDEV1_DATA': the assignment of DEV3301_1 is not assured. Try labeling your external drives. This will give you a predictable mount-point. (makes sense I will do this from now on )
'rsync' will (by-default) only update without sending everything again. So, subsequent executions usually occur faster than the initial sync. It depends on the amount of data that has changed. (Understand)

thanks regards Peter

User avatar
OneCD
Ask me anything
Posts: 7773
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: How to Delete a Folder created in CACHEDEV1_DATA with path pointing to root /

Post by OneCD » Tue Mar 03, 2020 11:17 am

PeeBee wrote:
Tue Mar 03, 2020 4:57 am
( I have tried this but for my inital backup but I could not do it in one complete backup job, I had to setup 5 different jobs, unless I set the backup process up incorrectly ?) if not then that means you can not set and forget when doing incremtal backups ... you would have to run though every job and start it after previous job has finished ?
I'll start by admitting that I've not used Hybrid Backup Sync. It was still called Backup Station when I did. ;)

But, it supported multiple folder-pairs. I think 5 per job was the limit.

If you recreated that link to your root share folder and backed that up, there's no need to use multiple backup jobs. It's a single source path to a single destination path.

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

PeeBee
Starting out
Posts: 11
Joined: Tue May 30, 2017 10:54 am

Re: How to Delete a Folder created in CACHEDEV1_DATA with path pointing to root /

Post by PeeBee » Tue Mar 03, 2020 2:19 pm

Okay that makes sense .....then I can also use the same job as incremental if needed i'll give it a go,
anyway you have been a champ !!! ....it has been refreshing to deal with some one like yourself :DD
thanks for all your help.
best regards Peter

User avatar
OneCD
Ask me anything
Posts: 7773
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: How to Delete a Folder created in CACHEDEV1_DATA with path pointing to root /

Post by OneCD » Tue Mar 03, 2020 2:21 pm

No worries Peter, glad to help. :D

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

PeeBee
Starting out
Posts: 11
Joined: Tue May 30, 2017 10:54 am

Re: How to Delete a Folder created in CACHEDEV1_DATA with path pointing to root /

Post by PeeBee » Sat Mar 14, 2020 7:25 am

Hi OneCd,
well i bought myself another 10 TB Hard driver to back up 8.3 Tb of my Qnap data trying with you method mentioned :
PeeBee wrote:
Tue Mar 03, 2020 4:57 am
If you recreated that link to your root share folder and backed that up, there's no need to use multiple backup jobs. It's a single source path to a single destination path.
but I am getting some weird log results
TOTAL TB TRANSFER.jpg
I figured I only actually have 8.3 TB of data so 'llI leave this job go an see what happens I have tried this once and got the hard drive full error ?

before I go back to my old trusty command line backup I was wondering what your thoughts are here why is this seeing 528 tb of data and I noted on the log 1/ 945810 Folder pairs ?

thanks Peter
You do not have the required permissions to view the files attached to this post.

User avatar
OneCD
Ask me anything
Posts: 7773
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: How to Delete a Folder created in CACHEDEV1_DATA with path pointing to root /

Post by OneCD » Sat Mar 14, 2020 8:03 am

PeeBee wrote:
Sat Mar 14, 2020 7:25 am
... I was wondering what your thoughts are here why is this seeing 528 tb of data ... ?
:shock:

Unless you have some weird loopback symlinks or filesystem corruption, I think that's a bug. We're still a few years away from dealing with data-stores this large in the average domestic NAS. :wink:

Hmm, I wonder if this is due to your bespoke "root" share? Where exactly did you point it to?

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

PeeBee
Starting out
Posts: 11
Joined: Tue May 30, 2017 10:54 am

Re: How to Delete a Folder created in CACHEDEV1_DATA with path pointing to root /

Post by PeeBee » Sat Mar 14, 2020 8:14 am

I create this root folder in File station and in the manual path section I just put a / in it ...when I click root in the file station I can see all my folders on one folder ...you could be on to something with loopback that was what I was thinking I divided the total 518TB by my number of folders to see if every individual folder was not calculating as a total of 8 TB x Folder numbers in root level .......so how can I check my Test symlinks loopbacks?

Post Reply

Return to “Linux & Unix (NFS)”