Move and copy files between folders

About

This document describes how to transfer file and folders to the project folder from home or personal scratch folder and vice versa.

Note that the files user and group ownership has to the set correct to match the storage quota policy, which is based on counting the content that belong to the corresponding group of users. See Calculation of the storage space utilization for more details on how the storage quota is computed.

Transferring files and folders from /home/username to /disco[2]fs/username or vice versa

The role of the home and personal scratch folders is explained in Home folder (/home/username) and Personal scratch and storage folder (/discofs/username), and Fast scratch folder (/disco2fs/username).

If files and/or folders are to be moved from /home/username to /discofs/username, or /disco2fs/username, it is imperative to ensure that the appropriate ownership is set at the target location. The app rsync can be used to “upload” the content from the source to the destination folder and simultaneously assign ownership to every object already relocated there:

rsync -vrtl --remove-source-files --chown=`whoami`:`whoami` /home/`whoami`/folder /discofs/`whoami`/subfolder

If the files and folders are to be copied to /discofs/username, remove --remove-source-files from the above command line:

rsync -vrtl --chown=`whoami`:`whoami` /home/`whoami`/folder /discofs/`whoami`/subfolder

Transferring files and folders to /discofs/projectname

The role of the project folder is clarified in Per-project scratch and storage folder (/discofs/projectname). Note that the project folder has a special group ownership. All files and folders stored under /discofs/projectname are owned by the group with name projectname (even if projectname in /discofs/projectname is written with capital letters, the group name of the owner is always in lowercace).

The role of the project folder is explained in Per-project scratch and storage folder (/discofs/projectname). Please note that the project folder has special group ownership. All files and folders located under the directory /discofs/projectname are the property of the group projectname. Even if projectname in /discofs/projectname contains capital letters, the group name of the owner must be always written in lowercase.

To transfer files or folders from /home/username or /discofs/username, or /disco2fs/username, into /discofs/projectname rsync is to be used.

For moving files:

rsync -vrtl --remove-source-files --chown=`whoami`:projectname /home/`whoami`/folder /discofs/projectname/

If the files and folders are to be copied to /discofs/projectname, remove --remove-source-files from the above command line:

rsync -vrtl --chown=`whoami`:projectname /home/`whoami`/folder /discofs/projectname/

Transferring files and folders from /discofs/projectname

The role of the project folder is clarified in Per-project scratch and storage folder (/discofs/projectname). Note that the project folder has a special group ownership. All files and folders stored under /discofs/projectname are owned by the group with name projectname (even if projectname in discofs/projectname is written with capital letters, the group name of the owner is always in lowercace).

The role of the project folder is explained in Per-project scratch and storage folder (/discofs/projectname). Please note that the project folder has special group ownership. All files and folders located under the directory /discofs/projectname are the property of the group projectname. Even if projectname in /discofs/projectname contains capital letters, the group name of the owner must be always written in lowercase. On the other side, the ownership of the files and folders in /home/username or /discofs/username, or /disco2fs/username, is one of the primary group of the user. Therefore, if files and folders are to be transferred from /discofs/projectname into /home/username or /discofs/username, or /disco2fs/username, their ownership has to be changed at the target.

To transfer files and folders from from /discofs/projectname into /home/username or /discofs/username, or /disco2fs/username, rsync is to be used.

For moving files:

rsync -vrtl --remove-source-files --chown=`whoami`:`whoami` /discofs/projectname/folder /home/`whoami`/

If the files and folders are to be copied to /discofs/projectname, remove --remove-source-files from the above command line:

rsync -vrtl --chown=`whoami`:`whoami` /discofs/projectname/folder /home/`whoami`/

Getting help

See Getting help