Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Transfer files to new ISCSI mounted drive and create smylink from the old folder so that all new files are saved to the ISCSI drive.

Posted on 2016-09-07
5
Medium Priority
?
69 Views
Last Modified: 2016-09-14
Hello all,
    I am using a cloud file hosting application called Owncloud, and they do not have much documentation on trying to move your data directory to a new destination (someone opened a ticket about it and they closed it, saying not enough people cared to do it). Someone replied to my forum post saying that using some standard Linux commands (Using Ubuntu 14.04), that this could be done, as long as only the data directory was move, and not the temporary directory.

    I added a 300gb ISCSI drive that is connected to a new NAS that we have implemented, so I am trying to see what the best way to go about this would be. The data is housed in /var/www/owncloud/data, my ISCSI drive is just in /docs If anyone could point me in the right direction on how to do this, I would be most appreciative.

Thanks!
0
Comment
Question by:MostHated
  • 3
  • 2
5 Comments
 
LVL 40

Expert Comment

by:noci
ID: 41791993
The next script should do that:

for dir in /var/www/owncloud/data/*
do
   if [ -d $dir ] 
   then
        user=$( basename $dir)
        cp -r ${dir}/files/*   /docs/${user}/
   fi
done

Open in new window

0
 
LVL 1

Accepted Solution

by:
MostHated earned 0 total points
ID: 41792074
I actually just found something that worked perfectly!

https://manandkeyboard.tk/2014/09/15/owncloud-and-an-external-hard-drive/
0
 
LVL 40

Expert Comment

by:noci
ID: 41792260
From the question i got the impression you just wanted to move the private files from an owncloud instance. to get rid of the instance.
1
 
LVL 1

Author Comment

by:MostHated
ID: 41794142
Ah, my apologies, all data and what not is stored locally on the same server, I just had my data drive as local storage on my server and didn't want to provision that much extra storage on the server itself. I should have clarified a bit better.
0
 
LVL 1

Author Closing Comment

by:MostHated
ID: 41797515
I was actually able to figure it out perfectly using the below.

https://manandkeyboard.tk/2014/09/15/owncloud-and-an-external-hard-drive/
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The business world is becoming increasingly integrated with tech. It’s not just for a select few anymore — but what about if you have a small business? It may be easier than you think to integrate technology into your small business, and it’s likely…
How much do you know about the future of data centers? If you're like 50% of organizations, then it's probably not enough. Read on to get up to speed on this emerging field.
This Micro Tutorial will teach you how to reformat your flash drive. Sometimes your flash drive may have issues carrying files so this will completely restore it to manufacturing settings. Make sure to backup all files before reformatting. This w…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month12 days, 18 hours left to enroll

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question