Browse File System in Admin GUI

Status
Not open for further replies.

John R

Cadet
Joined
Apr 20, 2015
Messages
4
Hello Everyone.

I've been running Freenas 9.1.1 for quite a while and it's very stable and don't have any issues at all. I use Freenas as a basic Windows fileserver for backing up customer data before working on their computer. The volume is ZFS.

What I would like to do (if possible) is to find a faster way to delete old customer data. I usually keep their data for 30 days, but most of it stays a lot longer because I get busy and don't delete them unless I start running out of space on the volume.

I've used Windows Explorer to delete massive amounts of data, but it's very slow and many times will prompt several times to "make sure" that I want to do that...

I've also used CMD prompt DEL command as well as PowerShell Remove-Item command. Both of these work faster, but it still seems to take way to long to purge old files and folders....

Is there a way to browse / edit / delete files and folders from the Freenas GUI?

Thanks!
John
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
You can't browse files ... From the webGUI, but you could drop into the shell and do it.

You can access the shell via a SSH connection, the server console, or. from the webGUI.

You need to be very careful. If you navigate to the correct directory with the CD command. Once you are in the right directory, you could use the rm command to remove the files directly on the server.

But you need to be extremely careful.


Sent from my phone
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
More accurately, you're using Unix commands. FreeNAS is FreeBSD, not Linux, but the large majority of the shell commands are the same.
 

John R

Cadet
Joined
Apr 20, 2015
Messages
4
OK... thanks. I was just looking at the shell from the Admin GUI. Where is the mount point for the ZFS volumes located? If I'm not using the correct term, I'm look to change directories so I can browse the file / folder structure that is stored. I was assuming that I would see something called "mnt" that I could change directories into....

Thanks!
 

John R

Cadet
Joined
Apr 20, 2015
Messages
4
Great... this is exactly what I was looking for.

The correct command to delete a folder recursively is: rm -rf foldername OR rm -rfv foldername if you want a verbose listing.

This is tons faster than DOS, PowerShell or Windows Explorer!
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
Another approach would be to create a new dataset and share for each client's backup. Then when you're ready to purge, just delete the share and destroy the dataset. The advantage to this approach is that you can do it all from the GUI.
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
Another approach would be to create a new dataset and share for each client's backup. Then when you're ready to purge, just delete the share and destroy the dataset. The advantage to this approach is that you can do it all from the GUI.
Excellent idea
 

ChristianW

Dabbler
Joined
Sep 16, 2015
Messages
28
You can also run a find routine, to find files older than 30 days, and pass the find results to a remove routine. This you might run as a daily cronjob:

Rather do a test before - finds and lists older than 30 days:
find /mnt/poolname -mtime +30 -exec ls -l {} \;

For deleting - finds and removes older than 30 days:
find /mnt/poolname -mtime +30 -exec rm {} \;

Edit: Be aware that if you keep the original timestamps in your backup, the fresh backup files might also be older than 30 days:
- Client creates document on 1.1.2015
- you do a backup via rsync -a (for example) on 1.2.2015
- The find-cronjob would remove this document.

And maybe snapshotting might be also something for you. Just do a daily snapshot with 30 days time to live. For me the advantage: You will have always copies of changed files for 30 days. So if your client had changed a file a week ago and needs the old version today. Just take it out of the snapshot.
 
Last edited:

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
:)
 
Status
Not open for further replies.
Top