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
52 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Linux Hosting 16 102
Dell R730 NVMe Raid Options 4 123
Optimizing SAN 16 48
Linux 6 31
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.
In this article we will learn how to backup a VMware farm using Nakivo Backup & Replication. In this tutorial we will install the software on a Windows 2012 R2 Server.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

738 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