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
25 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 39

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 39

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

The purpose of this article is to demonstrate how we can use conditional statements using Python.
Lets start to have a small explanation what is VAAI(vStorage API for Array Integration ) and what are the benefits using it. VAAI is an API framework in VMware that enable some Storage tasks. It first presented in ESXi 4.1, but only after 5.x sup…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now