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
49 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

This article is an update and follow-up of my previous article:   Storage 101: common concepts in the IT enterprise storage This time, I expand on more frequently used storage concepts.
The question appears often enough, how do I transfer my data from my old server to the new server while preserving file shares, share permissions, and NTFS permisions.  Here are my tips for handling such a transfer.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

679 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