<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://snicdocs.nsc.liu.se/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Robert+Pilst%C3%A5l+%28NSC%29</id>
	<title>SNIC Documentation - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://snicdocs.nsc.liu.se/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Robert+Pilst%C3%A5l+%28NSC%29"/>
	<link rel="alternate" type="text/html" href="https://snicdocs.nsc.liu.se/wiki/Special:Contributions/Robert_Pilst%C3%A5l_(NSC)"/>
	<updated>2026-04-25T12:35:36Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.10</generator>
	<entry>
		<id>https://snicdocs.nsc.liu.se/w/index.php?title=Swestore-dCache&amp;diff=7388</id>
		<title>Swestore-dCache</title>
		<link rel="alternate" type="text/html" href="https://snicdocs.nsc.liu.se/w/index.php?title=Swestore-dCache&amp;diff=7388"/>
		<updated>2020-03-03T10:47:49Z</updated>

		<summary type="html">&lt;p&gt;Robert Pilstål (NSC): /* From the command line */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Storage]]&lt;br /&gt;
[[Category:Swestore]]&lt;br /&gt;
[[Category:Swestore]]&lt;br /&gt;
[[Category:Swestore user guide]]&lt;br /&gt;
&lt;br /&gt;
Swestore-dCache is distributed across the SNIC centres [http://www.c3se.chalmers.se/ C3SE], [http://www.hpc2n.umu.se/ HPC2N], [http://www.lunarc.lu.se/ Lunarc] and [http://www.nsc.liu.se/ NSC]. Data is stored in two copies with each copy at a different SNIC centre. This enables the system to cope with a multitude of issues ranging from a simple crash of a storage element to losing an entire site while still providing access to the stored data. &lt;br /&gt;
&lt;br /&gt;
One of the major advantages to the distributed nature of Swestore is the excellent aggregated transfer rates possible. This is achieved by bypassing a central node and having transfers going directly to/from the storage elements if the selected transfer protocol allows it. Swestore can achieve aggregated transfer rates in excess of 100 Gigabit per second, but in practice this is limited by connectivity to the end user, each university or a limited number of files (typically max 1 Gbit/s per file/connection).&lt;br /&gt;
&lt;br /&gt;
To protect against silent data corruption the dCache storage system checksums all stored data and periodically verifies the data using this checksum.&lt;br /&gt;
&lt;br /&gt;
The dCache system does NOT yet provide protection against user errors like inadvertent file deletions.&lt;br /&gt;
&lt;br /&gt;
== Acquire and manage certificate (for users accessing with certificate authentication) ==&lt;br /&gt;
&lt;br /&gt;
Certificate authentication is needed in some special cases, and more convenient for use in automation (ie. Robot certificates).&lt;br /&gt;
&lt;br /&gt;
Some communities require certificate authentication and such users might already have a certificate, that certificate is likely good to use with Swestore.&lt;br /&gt;
&lt;br /&gt;
If you need to use Certificate authentication, follow the instruction on the page [[Certificate Setup for Swestore]].&lt;br /&gt;
&lt;br /&gt;
= Using Swestore =&lt;br /&gt;
== Download and upload data ==&lt;br /&gt;
=== From the command line ===&lt;br /&gt;
&lt;br /&gt;
There are several command line tools capable of using the protocols provided by Swestore. For usage on SNIC clusters we recommend using the ARC tools which should be installed on all SNIC resources.&lt;br /&gt;
&lt;br /&gt;
As an integration point for building scripts and automated systems we suggest using the curl program and library.&lt;br /&gt;
&lt;br /&gt;
:; Interactive tools&lt;br /&gt;
:: Best suited for interactive use with various support for directory listings, wildcards etc.&lt;br /&gt;
::;Currently no suitable tools to recommend&lt;br /&gt;
:; Command-line tools&lt;br /&gt;
:: These tools are also suitable for scripting or automation.&lt;br /&gt;
::; rclone&lt;br /&gt;
::: Supports multiple protocols.&lt;br /&gt;
::: Please see the instructions for [[Accessing Swestore with rclone]].&lt;br /&gt;
::; cURL&lt;br /&gt;
::: Please see the instructions for [[Accessing Swestore with cURL]]. We suggest using this as integration point for building scripts and automated systems.&lt;br /&gt;
::; davix&lt;br /&gt;
::: Swestore-specific documentation not written yet. See upstream documentation at https://davix.web.cern.ch/davix/docs/master/&lt;br /&gt;
::: Use access URL: davs://webdav.swestore.se:1443/&lt;br /&gt;
::; ARC&lt;br /&gt;
::: Certificate authentication only. Supports multiple protocols.&lt;br /&gt;
::: Please see the instructions for [[Accessing Swestore with the ARC client]].&lt;br /&gt;
::; gfal2&lt;br /&gt;
::: Certificate authentication only. Supports multiple protocols.&lt;br /&gt;
::: Swestore-specific documentation not written yet. See upstream documentation at https://dmc.web.cern.ch/projects/gfal-2/documentation&lt;br /&gt;
::: Use access URL: gsiftp://gsiftp.swestore.se/&lt;br /&gt;
::; https://duck.sh/&lt;br /&gt;
::: Command-line client for Windows/macOS/Linux (not documented yet)&lt;br /&gt;
&lt;br /&gt;
=== Using a GUI client ===&lt;br /&gt;
&lt;br /&gt;
Graphical User Interface (GUI) clients are known to work on some operating systems.&lt;br /&gt;
&lt;br /&gt;
:; Cyberduck&lt;br /&gt;
:: Please see the instructions for [[Accessing Swestore using Cyberduck]] '''Recommended method on macOS'''&lt;br /&gt;
:; WinSCP&lt;br /&gt;
:: Please see the instructions for [[Accessing Swestore using WinSCP]] '''Recommended method on Windows'''&lt;br /&gt;
&lt;br /&gt;
=== From a web browser ===&lt;br /&gt;
&lt;br /&gt;
Swestore is accessible in your web browser as a simple directory index interface at https://webdav.swestore.se/.&lt;br /&gt;
&lt;br /&gt;
Web browser access supports both username/password and certificate authentication.&lt;br /&gt;
&lt;br /&gt;
Projects are organized under the &amp;lt;code&amp;gt;/snic&amp;lt;/code&amp;gt; directory as &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://webdav.swestore.se/snic/DIRECTORY_NAME/&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== JavaScript WebDAV client ====  &lt;br /&gt;
&lt;br /&gt;
Swestore dCache can also be accessed in your browser, through a JavaScript client, over WebDAV at https://webdav.swestore.se/browser/ .&lt;br /&gt;
&lt;br /&gt;
=== Legacy documentation ===&lt;br /&gt;
&lt;br /&gt;
There are other clients/methods available, but not recommended for new deployments. See [[:Category:Swestore user guide]] for a complete list of documentation.&lt;br /&gt;
&lt;br /&gt;
== Enabled access protocols ==&lt;br /&gt;
A design criteria for Swestore is to provide the storage over a number of standardized and public protocols. There is no vendor specific client needed for access. &lt;br /&gt;
&lt;br /&gt;
:; GridFTP&lt;br /&gt;
:: Also called gsiftp. Well supported within Swestore.&lt;br /&gt;
:: Features: Transfer checksums. Direct transfer from/to storage pools for high speed transfers.&lt;br /&gt;
:: Access URL: gsiftp://gsiftp.swestore.se/&lt;br /&gt;
:; HTTP/WebDAV&lt;br /&gt;
:: Contender for being the recommended protocol for Swestore.&lt;br /&gt;
:: Features: Support in web browsers. Supports direct transfer of files from/to storage pools improving performance (varying support in clients).&lt;br /&gt;
::; Authenticated access&lt;br /&gt;
::: This is the normal read-write access.&lt;br /&gt;
::: Access URL: https://webdav.swestore.se/ (non-redirected)&lt;br /&gt;
::: Access URL: https://webdav.swestore.se:1443/ (redirected)&lt;br /&gt;
::: Access URL: https://webdav.swestore.se:2443/ (redirected reads)&lt;br /&gt;
::; Unauthenticated read-only access&lt;br /&gt;
::: For special cases only.&lt;br /&gt;
::: Access URL: http://webdav.swestore.se/ (unauthenticated, read-only, non-redirected)&lt;br /&gt;
::: Access URL: http://webdav.swestore.se:1080/ (unauthenticated, read-only, redirected)&lt;br /&gt;
::: Access URL: http://webdav.swestore.se:2080/ (unauthenticated, read-only, redirected reads)&lt;br /&gt;
:; NFSv4.1&lt;br /&gt;
:: Used by some communities, not recommended for general use&lt;br /&gt;
:; SRM - Storage Resource Manager&lt;br /&gt;
:: Used by some communities, not recommended for general use.&lt;br /&gt;
:: Access URL: srm://srm.swegrid.se/&lt;br /&gt;
:; Xrootd&lt;br /&gt;
:: Used by some communities, not recommended for general use&lt;br /&gt;
:; DCAP&lt;br /&gt;
:: Used by some communities, not recommended for general use&lt;br /&gt;
&lt;br /&gt;
== Usage monitoring ==&lt;br /&gt;
* On the project page in SUPR: https://supr.snic.se&lt;br /&gt;
* On the monitoring server for Swestore: http://status.swestore.se/munin/monitor/monitor/  (only accessible from .se-domains.&lt;br /&gt;
&lt;br /&gt;
= Support =&lt;br /&gt;
&lt;br /&gt;
If you have any issues using Swestore, please do not hesitate to contact [mailto:support@swestore.se support@swestore.se].&lt;/div&gt;</summary>
		<author><name>Robert Pilstål (NSC)</name></author>
		
	</entry>
	<entry>
		<id>https://snicdocs.nsc.liu.se/w/index.php?title=Accessing_Swestore_with_rclone&amp;diff=7387</id>
		<title>Accessing Swestore with rclone</title>
		<link rel="alternate" type="text/html" href="https://snicdocs.nsc.liu.se/w/index.php?title=Accessing_Swestore_with_rclone&amp;diff=7387"/>
		<updated>2020-03-03T10:47:42Z</updated>

		<summary type="html">&lt;p&gt;Robert Pilstål (NSC): &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Grid computing]]&lt;br /&gt;
[[Category:SweGrid user guide]]&lt;br /&gt;
[[Category:Swestore]]&lt;br /&gt;
[[Category:Swestore user guide]]&lt;br /&gt;
&lt;br /&gt;
[[Swestore|&amp;lt; Swestore]]&lt;br /&gt;
&lt;br /&gt;
This guide describes how to use the [https://rclone.org/webdav/ Rclone] ''WebDAV'' client for storing and retrieving files from Swestore. Rclone is versatile and supports many protocols through a simple command line interface (CLI).&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
To access Swestore using the rclone you need to be a member of a Swestore storage project, see [[Swestore#Getting access to Swestore]].&lt;br /&gt;
&lt;br /&gt;
To install rclone on your own computer, please follow your systems instructions at the official rclone documentation pages [https://rclone.org/install/ here].&lt;br /&gt;
&lt;br /&gt;
= Quickstart =&lt;br /&gt;
&lt;br /&gt;
== Swestore access URL ==&lt;br /&gt;
&lt;br /&gt;
The WebDAV access URL for Swestore should be specified for &amp;lt;code&amp;gt;rclone&amp;lt;/code&amp;gt; as;&lt;br /&gt;
&lt;br /&gt;
:: https://webdav.swestore.se&lt;br /&gt;
&lt;br /&gt;
== Basic commands ==&lt;br /&gt;
: &amp;lt;code&amp;gt;rclone config&amp;lt;/code&amp;gt; - configure rclone. See [https://rclone.org/docs/#configure Rclone configuration] for details.&lt;br /&gt;
: &amp;lt;code&amp;gt;rclone ls&amp;lt;/code&amp;gt; - for listing files. Works similarly to &amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt;. See [https://rclone.org/commands/rclone_ls/ Rclone ls].&lt;br /&gt;
: &amp;lt;code&amp;gt;rclone copyto&amp;lt;/code&amp;gt; - for copying directories or separate files. Works similarly to &amp;lt;code&amp;gt;cp&amp;lt;/code&amp;gt; with wildcards. See [https://rclone.org/commands/rclone_copyto/ Rclone copyto].&lt;br /&gt;
: &amp;lt;code&amp;gt;rclone copy&amp;lt;/code&amp;gt; - for copying contents of directories. Works similarly to &amp;lt;code&amp;gt;cp -R path/*&amp;lt;/code&amp;gt;. See [https://rclone.org/commands/rclone_copy/ Rclone copy].&lt;br /&gt;
: &amp;lt;code&amp;gt;rclone mkdir&amp;lt;/code&amp;gt; - for creating directories. Works similarly to &amp;lt;code&amp;gt;mkdir -p&amp;lt;/code&amp;gt;. See [https://rclone.org/commands/rclone_mkdir/ Rclone mkdir].&lt;br /&gt;
: &amp;lt;code&amp;gt;rclone deletefile&amp;lt;/code&amp;gt; - for removing specific files. Works similarly to &amp;lt;code&amp;gt;rm&amp;lt;/code&amp;gt;. See [https://rclone.org/commands/rclone_deletefile/ Rclone deletefile].&lt;br /&gt;
:: More powerful removal functions are available, but '''be careful''' with these;&lt;br /&gt;
::: &amp;lt;code&amp;gt;rclone delete&amp;lt;/code&amp;gt; - for removing all files under path - i.e. '''you loose your data'''. Works similarly to &amp;lt;code&amp;gt;find path -type f | xargs rm&amp;lt;/code&amp;gt;. See [https://rclone.org/commands/rclone_delete/ Rclone delete].&lt;br /&gt;
::: &amp;lt;code&amp;gt;rclone rmdir&amp;lt;/code&amp;gt; - removing path if empty. Works similarly to &amp;lt;code&amp;gt;rm -d&amp;lt;/code&amp;gt;. See [https://rclone.org/commands/rclone_rmdir/ Rclone rmdir].&lt;br /&gt;
::: &amp;lt;code&amp;gt;rclone rmdirs&amp;lt;/code&amp;gt; - removing all empty directories under path. Works similarly to &amp;lt;code&amp;gt;find path -type d | awk '{ print length, $0 }' | sort -nsr | cut -d&amp;quot; &amp;quot; -f2- | xargs rm -d&amp;lt;/code&amp;gt; (example modified from [https://stackoverflow.com/a/5917762 stackoverflow]). See [https://rclone.org/commands/rclone_rmdirs/ Rclone rmdirs].&lt;br /&gt;
::: &amp;lt;code&amp;gt;rclone purge&amp;lt;/code&amp;gt; - removing all data under path, including path - i.e. '''you loose your data'''. Works similarly to &amp;lt;code&amp;gt;rm -rf&amp;lt;/code&amp;gt;. See [https://rclone.org/commands/rclone_purge/ Rclone purge].&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;man&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--help&amp;lt;/code&amp;gt; to get more info on rclone and its commands. Examples: &amp;lt;code&amp;gt;man rclone&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;rclone --help&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;rclone copy --help&amp;lt;/code&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
== Paths ==&lt;br /&gt;
The rclone commands supports multiple storage protocols. Given that you have configured &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://webdav.swestore.se&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; as the &amp;lt;code&amp;gt;swestore&amp;lt;/code&amp;gt; remote, we recommend using WebDAV with paths on the form &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;swestore:/snic/YOUR_PROJECT_DIR/...&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
You have to configure rclone with your access protocol, URL and user login credentials for it to work. Simply issue the following configuration command to interactively configure rclone;&lt;br /&gt;
&lt;br /&gt;
 $ rclone config&lt;br /&gt;
&lt;br /&gt;
For configuring WebDAV, this amounts to answering something along the lines;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; for '''New remote'''&lt;br /&gt;
: &amp;lt;code&amp;gt;swestore&amp;lt;/code&amp;gt; for '''name'''&lt;br /&gt;
: &amp;lt;code&amp;gt;33&amp;lt;/code&amp;gt; for '''Storage''' (WebDAV)&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://webdav.swestore.se&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; for '''url'''&lt;br /&gt;
: &amp;lt;code&amp;gt;4&amp;lt;/code&amp;gt; for '''vendor''' (Other)&lt;br /&gt;
: &amp;lt;code&amp;gt;yourusername&amp;lt;/code&amp;gt; for '''user''', should be on the format &amp;lt;code&amp;gt;s_user&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt; for '''Yes type in my own password'''&lt;br /&gt;
:: then enter your swestore password twice&lt;br /&gt;
: Just press &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;Enter&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; for '''bearer_token'''&lt;br /&gt;
: &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; for '''Edit advanced config?'''&lt;br /&gt;
: &amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt; if you think the resulting config is correct, otherwise &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt; to edit again.&lt;br /&gt;
: &amp;lt;code&amp;gt;q&amp;lt;/code&amp;gt; to '''Quit config'''&lt;br /&gt;
&lt;br /&gt;
To see your configuartion afterwards, run&lt;br /&gt;
&lt;br /&gt;
 $ cat ~/.config/rclone/rclone.conf&lt;br /&gt;
&lt;br /&gt;
You can also list your configured remotes by issuing&lt;br /&gt;
&lt;br /&gt;
 $ rclone listremotes&lt;br /&gt;
&lt;br /&gt;
In the following sections, we are assuming your swestore remote is named &amp;lt;code&amp;gt;swestore&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Copying files = &lt;br /&gt;
&lt;br /&gt;
Copying files to and from resources is accomplished using the rclone '''copy''' and '''copyto''' command. &lt;br /&gt;
&lt;br /&gt;
== Copying single files ==&lt;br /&gt;
&lt;br /&gt;
Copying single files is accomplished in the same way as using the&lt;br /&gt;
normal '''cp''' command as shown in the following example:&lt;br /&gt;
&lt;br /&gt;
 $ rclone copyto archive.tar.gz swestore:/snic/YOUR_PROJECT_DIR/archive.tar.gz&lt;br /&gt;
&lt;br /&gt;
You can also use '''copyto''' in order to rename the file in the process of copying it to the destination, by specifying a different filename on the remote.&lt;br /&gt;
&lt;br /&gt;
== Recursive copying ==&lt;br /&gt;
&lt;br /&gt;
Recursive copying of a directory is accomplished using the '''copy''' command. The command will only copy files that have changed on the source compared to the destination, which is determined by checksums and timestamps. Observe that the source directory is not copied over, only its contents. Also, empty directories are omitted.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 $ rclone copy /path/to/src swestore:/snic/YOUR_PROJECT_DIR/DESTINATION_DIRECTORY&lt;br /&gt;
&lt;br /&gt;
The option '''--no-traverse''' can be used to not list files on the destination (good for huge directories). '''--max-age''' can be used to select the most recently modified files for transfer, and '''-P''' gives you status on progress.&lt;br /&gt;
&lt;br /&gt;
Example, copying the last days modifications, with progress:&lt;br /&gt;
&lt;br /&gt;
 $ rclone copy --max-age 24h --no-traverse -P /path/to/src swestore:/snic/YOUR_PROJECT_DIR/DESTINATION_DIRECTORY&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' The above example will copy all files in the directory &amp;lt;code&amp;gt;src&amp;lt;/code&amp;gt; into &lt;br /&gt;
the destination directory &amp;lt;code&amp;gt;DESTINATION_DIRECTORY&amp;lt;/code&amp;gt;. If you want the directory &amp;lt;code&amp;gt;src&amp;lt;/code&amp;gt;&lt;br /&gt;
to be part of the destination path you have to explicitly supply it as shown in the example below:&lt;br /&gt;
&lt;br /&gt;
 $ rclone copy /path/to/src swestore:/snic/YOUR_PROJECT_DIR/DESTINATION_DIRECTORY/src&lt;br /&gt;
&lt;br /&gt;
= Listing =&lt;br /&gt;
&lt;br /&gt;
Rclone supports listing all files under a path; you can list recursively with the '''-R''' flag.&lt;br /&gt;
&lt;br /&gt;
Listing files and directories on a resources is done using the '''ls'''&lt;br /&gt;
or one of the '''ls*''' commands (see below). The simple '''ls''' command&lt;br /&gt;
only lists objects and their sizes;&lt;br /&gt;
&lt;br /&gt;
 $ rclone ls swestore:/snic/YOUR_PROJECT_DIR&lt;br /&gt;
&lt;br /&gt;
Further functionality can be be achieved from using any of the the following '''ls*''' commands;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;code&amp;gt;lsl&amp;lt;/code&amp;gt; long listing with additional info&lt;br /&gt;
: &amp;lt;code&amp;gt;lsd&amp;lt;/code&amp;gt; list only directories&lt;br /&gt;
: &amp;lt;code&amp;gt;lsf&amp;lt;/code&amp;gt; list objects and directories, in a fashion good for scripting&lt;br /&gt;
: &amp;lt;code&amp;gt;lsjson&amp;lt;/code&amp;gt; gives advanced output in JSON format&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 $ rclone lsl swestore:/snic/YOUR_PROJECT_DIR&lt;br /&gt;
&lt;br /&gt;
= Creating directories = &lt;br /&gt;
&lt;br /&gt;
Directories are generally created on demand. If you copy a file with the destination /snic/YOUR_PROJECT_DIR/newdir/dummyfile the newdir directory will be created if missing. But you can explicitly create directories using the '''mkdir''' command.&lt;br /&gt;
&lt;br /&gt;
 $ rclone mkdir swestore:/snic/YOUR_PROJECT_DIR/newdir&lt;br /&gt;
&lt;br /&gt;
= Removing files or directories =&lt;br /&gt;
&lt;br /&gt;
'''Beware''' that the command '''delete''' will recursively delete all file objects under specified path!&lt;br /&gt;
&lt;br /&gt;
To remove the file &amp;lt;code&amp;gt;dummyfile&amp;lt;/code&amp;gt; under &amp;lt;code&amp;gt;/snic/YOUR_PROJECT_DIR/newdir&amp;lt;/code&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
 $ rclone deletefile swestore:/snic/YOUR_PROJECT_DIR/newdir/dummyfile&lt;br /&gt;
&lt;br /&gt;
To remove a directory, they have to be empty, and you use the command&lt;br /&gt;
&lt;br /&gt;
 $ rclone rmdir swestore:/snic/YOUR_PROJECT_DIR/newdir/&lt;br /&gt;
&lt;br /&gt;
To remove '''all''' empty directories under a path, use&lt;br /&gt;
&lt;br /&gt;
 $ rclone rmdirs swestore:/snic/YOUR_PROJECT_DIR/newdir/&lt;br /&gt;
&lt;br /&gt;
To recursively remove '''all''' files under &amp;lt;code&amp;gt;/snic/YOUR_PROJECT_DIR/newdir&amp;lt;/code&amp;gt;, leaving the empty directory structure in place, '''be careful''';&lt;br /&gt;
&lt;br /&gt;
 $ rclone delete swestore:/snic/YOUR_PROJECT_DIR/newdir/&lt;br /&gt;
&lt;br /&gt;
'''Do not use''' the command purge, as that will '''delete everything''' under the path specified.&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
&lt;br /&gt;
'''Q''': I used &amp;lt;code&amp;gt;rclone purge&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;rclone delete&amp;lt;/code&amp;gt; and have now deleted all my files; can I get them back somehow?&lt;br /&gt;
: '''A''': '''No'''. Swestore does not currently support recovery of data for which the user has explicably requested to be deleted from the system, be it intentionally or by mistake. Therefore '''caution''' is advised while using powerful tools such as &amp;lt;code&amp;gt;rclone&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Robert Pilstål (NSC)</name></author>
		
	</entry>
	<entry>
		<id>https://snicdocs.nsc.liu.se/w/index.php?title=Accessing_Swestore_with_rclone&amp;diff=7386</id>
		<title>Accessing Swestore with rclone</title>
		<link rel="alternate" type="text/html" href="https://snicdocs.nsc.liu.se/w/index.php?title=Accessing_Swestore_with_rclone&amp;diff=7386"/>
		<updated>2020-03-03T10:40:22Z</updated>

		<summary type="html">&lt;p&gt;Robert Pilstål (NSC): /* FAQ */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Grid computing]]&lt;br /&gt;
[[Category:SweGrid user guide]]&lt;br /&gt;
[[Category:Swestore]]&lt;br /&gt;
[[Category:Swestore user guide]]&lt;br /&gt;
&lt;br /&gt;
[[Swestore|&amp;lt; Swestore]]&lt;br /&gt;
&lt;br /&gt;
This guide describes how to use the [https://rclone.org/webdav/ Rclone] ''WebDAV'' client for storing and retrieving files from Swestore. Rclone is versatile and supports many protocols through a simple command line interface (CLI).&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
To access Swestore using the rclone you need to be a member of a Swestore storage project, see [[Swestore#Getting access to Swestore]].&lt;br /&gt;
&lt;br /&gt;
To install rclone on your own computer, please follow your systems instructions at the official rclone documentation pages [https://rclone.org/install/ here].&lt;br /&gt;
&lt;br /&gt;
= Quickstart =&lt;br /&gt;
&lt;br /&gt;
== Basic commands ==&lt;br /&gt;
: &amp;lt;code&amp;gt;rclone config&amp;lt;/code&amp;gt; - configure rclone. See [https://rclone.org/docs/#configure Rclone configuration] for details.&lt;br /&gt;
: &amp;lt;code&amp;gt;rclone ls&amp;lt;/code&amp;gt; - for listing files. Works similarly to &amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt;. See [https://rclone.org/commands/rclone_ls/ Rclone ls].&lt;br /&gt;
: &amp;lt;code&amp;gt;rclone copyto&amp;lt;/code&amp;gt; - for copying directories or separate files. Works similarly to &amp;lt;code&amp;gt;cp&amp;lt;/code&amp;gt; with wildcards. See [https://rclone.org/commands/rclone_copyto/ Rclone copyto].&lt;br /&gt;
: &amp;lt;code&amp;gt;rclone copy&amp;lt;/code&amp;gt; - for copying contents of directories. Works similarly to &amp;lt;code&amp;gt;cp -R path/*&amp;lt;/code&amp;gt;. See [https://rclone.org/commands/rclone_copy/ Rclone copy].&lt;br /&gt;
: &amp;lt;code&amp;gt;rclone mkdir&amp;lt;/code&amp;gt; - for creating directories. Works similarly to &amp;lt;code&amp;gt;mkdir -p&amp;lt;/code&amp;gt;. See [https://rclone.org/commands/rclone_mkdir/ Rclone mkdir].&lt;br /&gt;
: &amp;lt;code&amp;gt;rclone deletefile&amp;lt;/code&amp;gt; - for removing specific files. Works similarly to &amp;lt;code&amp;gt;rm&amp;lt;/code&amp;gt;. See [https://rclone.org/commands/rclone_deletefile/ Rclone deletefile].&lt;br /&gt;
:: More powerful removal functions are available, but '''be careful''' with these;&lt;br /&gt;
::: &amp;lt;code&amp;gt;rclone delete&amp;lt;/code&amp;gt; - for removing all files under path - i.e. '''you loose your data'''. Works similarly to &amp;lt;code&amp;gt;find path -type f | xargs rm&amp;lt;/code&amp;gt;. See [https://rclone.org/commands/rclone_delete/ Rclone delete].&lt;br /&gt;
::: &amp;lt;code&amp;gt;rclone rmdir&amp;lt;/code&amp;gt; - removing path if empty. Works similarly to &amp;lt;code&amp;gt;rm -d&amp;lt;/code&amp;gt;. See [https://rclone.org/commands/rclone_rmdir/ Rclone rmdir].&lt;br /&gt;
::: &amp;lt;code&amp;gt;rclone rmdirs&amp;lt;/code&amp;gt; - removing all empty directories under path. Works similarly to &amp;lt;code&amp;gt;find path -type d | awk '{ print length, $0 }' | sort -nsr | cut -d&amp;quot; &amp;quot; -f2- | xargs rm -d&amp;lt;/code&amp;gt; (example modified from [https://stackoverflow.com/a/5917762 stackoverflow]). See [https://rclone.org/commands/rclone_rmdirs/ Rclone rmdirs].&lt;br /&gt;
::: &amp;lt;code&amp;gt;rclone purge&amp;lt;/code&amp;gt; - removing all data under path, including path - i.e. '''you loose your data'''. Works similarly to &amp;lt;code&amp;gt;rm -rf&amp;lt;/code&amp;gt;. See [https://rclone.org/commands/rclone_purge/ Rclone purge].&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;man&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--help&amp;lt;/code&amp;gt; to get more info on rclone and its commands. Examples: &amp;lt;code&amp;gt;man rclone&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;rclone --help&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;rclone copy --help&amp;lt;/code&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
== Paths ==&lt;br /&gt;
The rclone commands supports multiple storage protocols. Given that you have configured &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://webdav.swestore.se&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; as the &amp;lt;code&amp;gt;swestore&amp;lt;/code&amp;gt; remote, we recommend using WebDAV with paths on the form &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;swestore:/snic/YOUR_PROJECT_DIR/...&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
You have to configure rclone with your access protocol, URL and user login credentials for it to work. Simply issue the following configuration command to interactively configure rclone;&lt;br /&gt;
&lt;br /&gt;
 $ rclone config&lt;br /&gt;
&lt;br /&gt;
For configuring WebDAV, this amounts to answering something along the lines;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; for '''New remote'''&lt;br /&gt;
: &amp;lt;code&amp;gt;swestore&amp;lt;/code&amp;gt; for '''name'''&lt;br /&gt;
: &amp;lt;code&amp;gt;33&amp;lt;/code&amp;gt; for '''Storage''' (WebDAV)&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://webdav.swestore.se&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; for '''url'''&lt;br /&gt;
: &amp;lt;code&amp;gt;4&amp;lt;/code&amp;gt; for '''vendor''' (Other)&lt;br /&gt;
: &amp;lt;code&amp;gt;yourusername&amp;lt;/code&amp;gt; for '''user''', should be on the format &amp;lt;code&amp;gt;s_user&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt; for '''Yes type in my own password'''&lt;br /&gt;
:: then enter your swestore password twice&lt;br /&gt;
: Just press &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;Enter&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; for '''bearer_token'''&lt;br /&gt;
: &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; for '''Edit advanced config?'''&lt;br /&gt;
: &amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt; if you think the resulting config is correct, otherwise &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt; to edit again.&lt;br /&gt;
: &amp;lt;code&amp;gt;q&amp;lt;/code&amp;gt; to '''Quit config'''&lt;br /&gt;
&lt;br /&gt;
To see your configuartion afterwards, run&lt;br /&gt;
&lt;br /&gt;
 $ cat ~/.config/rclone/rclone.conf&lt;br /&gt;
&lt;br /&gt;
You can also list your configured remotes by issuing&lt;br /&gt;
&lt;br /&gt;
 $ rclone listremotes&lt;br /&gt;
&lt;br /&gt;
In the following sections, we are assuming your swestore remote is named &amp;lt;code&amp;gt;swestore&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Copying files = &lt;br /&gt;
&lt;br /&gt;
Copying files to and from resources is accomplished using the rclone '''copy''' and '''copyto''' command. &lt;br /&gt;
&lt;br /&gt;
== Copying single files ==&lt;br /&gt;
&lt;br /&gt;
Copying single files is accomplished in the same way as using the&lt;br /&gt;
normal '''cp''' command as shown in the following example:&lt;br /&gt;
&lt;br /&gt;
 $ rclone copyto archive.tar.gz swestore:/snic/YOUR_PROJECT_DIR/archive.tar.gz&lt;br /&gt;
&lt;br /&gt;
You can also use '''copyto''' in order to rename the file in the process of copying it to the destination, by specifying a different filename on the remote.&lt;br /&gt;
&lt;br /&gt;
== Recursive copying ==&lt;br /&gt;
&lt;br /&gt;
Recursive copying of a directory is accomplished using the '''copy''' command. The command will only copy files that have changed on the source compared to the destination, which is determined by checksums and timestamps. Observe that the source directory is not copied over, only its contents. Also, empty directories are omitted.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 $ rclone copy /path/to/src swestore:/snic/YOUR_PROJECT_DIR/DESTINATION_DIRECTORY&lt;br /&gt;
&lt;br /&gt;
The option '''--no-traverse''' can be used to not list files on the destination (good for huge directories). '''--max-age''' can be used to select the most recently modified files for transfer, and '''-P''' gives you status on progress.&lt;br /&gt;
&lt;br /&gt;
Example, copying the last days modifications, with progress:&lt;br /&gt;
&lt;br /&gt;
 $ rclone copy --max-age 24h --no-traverse -P /path/to/src swestore:/snic/YOUR_PROJECT_DIR/DESTINATION_DIRECTORY&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' The above example will copy all files in the directory &amp;lt;code&amp;gt;src&amp;lt;/code&amp;gt; into &lt;br /&gt;
the destination directory &amp;lt;code&amp;gt;DESTINATION_DIRECTORY&amp;lt;/code&amp;gt;. If you want the directory &amp;lt;code&amp;gt;src&amp;lt;/code&amp;gt;&lt;br /&gt;
to be part of the destination path you have to explicitly supply it as shown in the example below:&lt;br /&gt;
&lt;br /&gt;
 $ rclone copy /path/to/src swestore:/snic/YOUR_PROJECT_DIR/DESTINATION_DIRECTORY/src&lt;br /&gt;
&lt;br /&gt;
= Listing =&lt;br /&gt;
&lt;br /&gt;
Rclone supports listing all files under a path; you can list recursively with the '''-R''' flag.&lt;br /&gt;
&lt;br /&gt;
Listing files and directories on a resources is done using the '''ls'''&lt;br /&gt;
or one of the '''ls*''' commands (see below). The simple '''ls''' command&lt;br /&gt;
only lists objects and their sizes;&lt;br /&gt;
&lt;br /&gt;
 $ rclone ls swestore:/snic/YOUR_PROJECT_DIR&lt;br /&gt;
&lt;br /&gt;
Further functionality can be be achieved from using any of the the following '''ls*''' commands;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;code&amp;gt;lsl&amp;lt;/code&amp;gt; long listing with additional info&lt;br /&gt;
: &amp;lt;code&amp;gt;lsd&amp;lt;/code&amp;gt; list only directories&lt;br /&gt;
: &amp;lt;code&amp;gt;lsf&amp;lt;/code&amp;gt; list objects and directories, in a fashion good for scripting&lt;br /&gt;
: &amp;lt;code&amp;gt;lsjson&amp;lt;/code&amp;gt; gives advanced output in JSON format&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 $ rclone lsl swestore:/snic/YOUR_PROJECT_DIR&lt;br /&gt;
&lt;br /&gt;
= Creating directories = &lt;br /&gt;
&lt;br /&gt;
Directories are generally created on demand. If you copy a file with the destination /snic/YOUR_PROJECT_DIR/newdir/dummyfile the newdir directory will be created if missing. But you can explicitly create directories using the '''mkdir''' command.&lt;br /&gt;
&lt;br /&gt;
 $ rclone mkdir swestore:/snic/YOUR_PROJECT_DIR/newdir&lt;br /&gt;
&lt;br /&gt;
= Removing files or directories =&lt;br /&gt;
&lt;br /&gt;
'''Beware''' that the command '''delete''' will recursively delete all file objects under specified path!&lt;br /&gt;
&lt;br /&gt;
To remove the file &amp;lt;code&amp;gt;dummyfile&amp;lt;/code&amp;gt; under &amp;lt;code&amp;gt;/snic/YOUR_PROJECT_DIR/newdir&amp;lt;/code&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
 $ rclone deletefile swestore:/snic/YOUR_PROJECT_DIR/newdir/dummyfile&lt;br /&gt;
&lt;br /&gt;
To remove a directory, they have to be empty, and you use the command&lt;br /&gt;
&lt;br /&gt;
 $ rclone rmdir swestore:/snic/YOUR_PROJECT_DIR/newdir/&lt;br /&gt;
&lt;br /&gt;
To remove '''all''' empty directories under a path, use&lt;br /&gt;
&lt;br /&gt;
 $ rclone rmdirs swestore:/snic/YOUR_PROJECT_DIR/newdir/&lt;br /&gt;
&lt;br /&gt;
To recursively remove '''all''' files under &amp;lt;code&amp;gt;/snic/YOUR_PROJECT_DIR/newdir&amp;lt;/code&amp;gt;, leaving the empty directory structure in place, '''be careful''';&lt;br /&gt;
&lt;br /&gt;
 $ rclone delete swestore:/snic/YOUR_PROJECT_DIR/newdir/&lt;br /&gt;
&lt;br /&gt;
'''Do not use''' the command purge, as that will '''delete everything''' under the path specified.&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
&lt;br /&gt;
'''Q''': I used &amp;lt;code&amp;gt;rclone purge&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;rclone delete&amp;lt;/code&amp;gt; and have now deleted all my files; can I get them back somehow?&lt;br /&gt;
: '''A''': '''No'''. Swestore does not currently support recovery of data for which the user has explicably requested to be deleted from the system, be it intentionally or by mistake. Therefore '''caution''' is advised while using powerful tools such as &amp;lt;code&amp;gt;rclone&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Robert Pilstål (NSC)</name></author>
		
	</entry>
	<entry>
		<id>https://snicdocs.nsc.liu.se/w/index.php?title=Accessing_Swestore_with_rclone&amp;diff=7385</id>
		<title>Accessing Swestore with rclone</title>
		<link rel="alternate" type="text/html" href="https://snicdocs.nsc.liu.se/w/index.php?title=Accessing_Swestore_with_rclone&amp;diff=7385"/>
		<updated>2020-03-02T15:24:44Z</updated>

		<summary type="html">&lt;p&gt;Robert Pilstål (NSC): Created page with &amp;quot;Category:Grid computing Category:SweGrid user guide Category:Swestore Category:Swestore user guide  &amp;lt; Swestore  This guide describes how to use the [...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Grid computing]]&lt;br /&gt;
[[Category:SweGrid user guide]]&lt;br /&gt;
[[Category:Swestore]]&lt;br /&gt;
[[Category:Swestore user guide]]&lt;br /&gt;
&lt;br /&gt;
[[Swestore|&amp;lt; Swestore]]&lt;br /&gt;
&lt;br /&gt;
This guide describes how to use the [https://rclone.org/webdav/ Rclone] ''WebDAV'' client for storing and retrieving files from Swestore. Rclone is versatile and supports many protocols through a simple command line interface (CLI).&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
To access Swestore using the rclone you need to be a member of a Swestore storage project, see [[Swestore#Getting access to Swestore]].&lt;br /&gt;
&lt;br /&gt;
To install rclone on your own computer, please follow your systems instructions at the official rclone documentation pages [https://rclone.org/install/ here].&lt;br /&gt;
&lt;br /&gt;
= Quickstart =&lt;br /&gt;
&lt;br /&gt;
== Basic commands ==&lt;br /&gt;
: &amp;lt;code&amp;gt;rclone config&amp;lt;/code&amp;gt; - configure rclone. See [https://rclone.org/docs/#configure Rclone configuration] for details.&lt;br /&gt;
: &amp;lt;code&amp;gt;rclone ls&amp;lt;/code&amp;gt; - for listing files. Works similarly to &amp;lt;code&amp;gt;ls&amp;lt;/code&amp;gt;. See [https://rclone.org/commands/rclone_ls/ Rclone ls].&lt;br /&gt;
: &amp;lt;code&amp;gt;rclone copyto&amp;lt;/code&amp;gt; - for copying directories or separate files. Works similarly to &amp;lt;code&amp;gt;cp&amp;lt;/code&amp;gt; with wildcards. See [https://rclone.org/commands/rclone_copyto/ Rclone copyto].&lt;br /&gt;
: &amp;lt;code&amp;gt;rclone copy&amp;lt;/code&amp;gt; - for copying contents of directories. Works similarly to &amp;lt;code&amp;gt;cp -R path/*&amp;lt;/code&amp;gt;. See [https://rclone.org/commands/rclone_copy/ Rclone copy].&lt;br /&gt;
: &amp;lt;code&amp;gt;rclone mkdir&amp;lt;/code&amp;gt; - for creating directories. Works similarly to &amp;lt;code&amp;gt;mkdir -p&amp;lt;/code&amp;gt;. See [https://rclone.org/commands/rclone_mkdir/ Rclone mkdir].&lt;br /&gt;
: &amp;lt;code&amp;gt;rclone deletefile&amp;lt;/code&amp;gt; - for removing specific files. Works similarly to &amp;lt;code&amp;gt;rm&amp;lt;/code&amp;gt;. See [https://rclone.org/commands/rclone_deletefile/ Rclone deletefile].&lt;br /&gt;
:: More powerful removal functions are available, but '''be careful''' with these;&lt;br /&gt;
::: &amp;lt;code&amp;gt;rclone delete&amp;lt;/code&amp;gt; - for removing all files under path - i.e. '''you loose your data'''. Works similarly to &amp;lt;code&amp;gt;find path -type f | xargs rm&amp;lt;/code&amp;gt;. See [https://rclone.org/commands/rclone_delete/ Rclone delete].&lt;br /&gt;
::: &amp;lt;code&amp;gt;rclone rmdir&amp;lt;/code&amp;gt; - removing path if empty. Works similarly to &amp;lt;code&amp;gt;rm -d&amp;lt;/code&amp;gt;. See [https://rclone.org/commands/rclone_rmdir/ Rclone rmdir].&lt;br /&gt;
::: &amp;lt;code&amp;gt;rclone rmdirs&amp;lt;/code&amp;gt; - removing all empty directories under path. Works similarly to &amp;lt;code&amp;gt;find path -type d | awk '{ print length, $0 }' | sort -nsr | cut -d&amp;quot; &amp;quot; -f2- | xargs rm -d&amp;lt;/code&amp;gt; (example modified from [https://stackoverflow.com/a/5917762 stackoverflow]). See [https://rclone.org/commands/rclone_rmdirs/ Rclone rmdirs].&lt;br /&gt;
::: &amp;lt;code&amp;gt;rclone purge&amp;lt;/code&amp;gt; - removing all data under path, including path - i.e. '''you loose your data'''. Works similarly to &amp;lt;code&amp;gt;rm -rf&amp;lt;/code&amp;gt;. See [https://rclone.org/commands/rclone_purge/ Rclone purge].&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;man&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--help&amp;lt;/code&amp;gt; to get more info on rclone and its commands. Examples: &amp;lt;code&amp;gt;man rclone&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;rclone --help&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;rclone copy --help&amp;lt;/code&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
== Paths ==&lt;br /&gt;
The rclone commands supports multiple storage protocols. Given that you have configured &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://webdav.swestore.se&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; as the &amp;lt;code&amp;gt;swestore&amp;lt;/code&amp;gt; remote, we recommend using WebDAV with paths on the form &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;swestore:/snic/YOUR_PROJECT_DIR/...&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
You have to configure rclone with your access protocol, URL and user login credentials for it to work. Simply issue the following configuration command to interactively configure rclone;&lt;br /&gt;
&lt;br /&gt;
 $ rclone config&lt;br /&gt;
&lt;br /&gt;
For configuring WebDAV, this amounts to answering something along the lines;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; for '''New remote'''&lt;br /&gt;
: &amp;lt;code&amp;gt;swestore&amp;lt;/code&amp;gt; for '''name'''&lt;br /&gt;
: &amp;lt;code&amp;gt;33&amp;lt;/code&amp;gt; for '''Storage''' (WebDAV)&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://webdav.swestore.se&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; for '''url'''&lt;br /&gt;
: &amp;lt;code&amp;gt;4&amp;lt;/code&amp;gt; for '''vendor''' (Other)&lt;br /&gt;
: &amp;lt;code&amp;gt;yourusername&amp;lt;/code&amp;gt; for '''user''', should be on the format &amp;lt;code&amp;gt;s_user&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt; for '''Yes type in my own password'''&lt;br /&gt;
:: then enter your swestore password twice&lt;br /&gt;
: Just press &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;Enter&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; for '''bearer_token'''&lt;br /&gt;
: &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; for '''Edit advanced config?'''&lt;br /&gt;
: &amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt; if you think the resulting config is correct, otherwise &amp;lt;code&amp;gt;e&amp;lt;/code&amp;gt; to edit again.&lt;br /&gt;
: &amp;lt;code&amp;gt;q&amp;lt;/code&amp;gt; to '''Quit config'''&lt;br /&gt;
&lt;br /&gt;
To see your configuartion afterwards, run&lt;br /&gt;
&lt;br /&gt;
 $ cat ~/.config/rclone/rclone.conf&lt;br /&gt;
&lt;br /&gt;
You can also list your configured remotes by issuing&lt;br /&gt;
&lt;br /&gt;
 $ rclone listremotes&lt;br /&gt;
&lt;br /&gt;
In the following sections, we are assuming your swestore remote is named &amp;lt;code&amp;gt;swestore&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Copying files = &lt;br /&gt;
&lt;br /&gt;
Copying files to and from resources is accomplished using the rclone '''copy''' and '''copyto''' command. &lt;br /&gt;
&lt;br /&gt;
== Copying single files ==&lt;br /&gt;
&lt;br /&gt;
Copying single files is accomplished in the same way as using the&lt;br /&gt;
normal '''cp''' command as shown in the following example:&lt;br /&gt;
&lt;br /&gt;
 $ rclone copyto archive.tar.gz swestore:/snic/YOUR_PROJECT_DIR/archive.tar.gz&lt;br /&gt;
&lt;br /&gt;
You can also use '''copyto''' in order to rename the file in the process of copying it to the destination, by specifying a different filename on the remote.&lt;br /&gt;
&lt;br /&gt;
== Recursive copying ==&lt;br /&gt;
&lt;br /&gt;
Recursive copying of a directory is accomplished using the '''copy''' command. The command will only copy files that have changed on the source compared to the destination, which is determined by checksums and timestamps. Observe that the source directory is not copied over, only its contents. Also, empty directories are omitted.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 $ rclone copy /path/to/src swestore:/snic/YOUR_PROJECT_DIR/DESTINATION_DIRECTORY&lt;br /&gt;
&lt;br /&gt;
The option '''--no-traverse''' can be used to not list files on the destination (good for huge directories). '''--max-age''' can be used to select the most recently modified files for transfer, and '''-P''' gives you status on progress.&lt;br /&gt;
&lt;br /&gt;
Example, copying the last days modifications, with progress:&lt;br /&gt;
&lt;br /&gt;
 $ rclone copy --max-age 24h --no-traverse -P /path/to/src swestore:/snic/YOUR_PROJECT_DIR/DESTINATION_DIRECTORY&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' The above example will copy all files in the directory &amp;lt;code&amp;gt;src&amp;lt;/code&amp;gt; into &lt;br /&gt;
the destination directory &amp;lt;code&amp;gt;DESTINATION_DIRECTORY&amp;lt;/code&amp;gt;. If you want the directory &amp;lt;code&amp;gt;src&amp;lt;/code&amp;gt;&lt;br /&gt;
to be part of the destination path you have to explicitly supply it as shown in the example below:&lt;br /&gt;
&lt;br /&gt;
 $ rclone copy /path/to/src swestore:/snic/YOUR_PROJECT_DIR/DESTINATION_DIRECTORY/src&lt;br /&gt;
&lt;br /&gt;
= Listing =&lt;br /&gt;
&lt;br /&gt;
Rclone supports listing all files under a path; you can list recursively with the '''-R''' flag.&lt;br /&gt;
&lt;br /&gt;
Listing files and directories on a resources is done using the '''ls'''&lt;br /&gt;
or one of the '''ls*''' commands (see below). The simple '''ls''' command&lt;br /&gt;
only lists objects and their sizes;&lt;br /&gt;
&lt;br /&gt;
 $ rclone ls swestore:/snic/YOUR_PROJECT_DIR&lt;br /&gt;
&lt;br /&gt;
Further functionality can be be achieved from using any of the the following '''ls*''' commands;&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;code&amp;gt;lsl&amp;lt;/code&amp;gt; long listing with additional info&lt;br /&gt;
: &amp;lt;code&amp;gt;lsd&amp;lt;/code&amp;gt; list only directories&lt;br /&gt;
: &amp;lt;code&amp;gt;lsf&amp;lt;/code&amp;gt; list objects and directories, in a fashion good for scripting&lt;br /&gt;
: &amp;lt;code&amp;gt;lsjson&amp;lt;/code&amp;gt; gives advanced output in JSON format&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 $ rclone lsl swestore:/snic/YOUR_PROJECT_DIR&lt;br /&gt;
&lt;br /&gt;
= Creating directories = &lt;br /&gt;
&lt;br /&gt;
Directories are generally created on demand. If you copy a file with the destination /snic/YOUR_PROJECT_DIR/newdir/dummyfile the newdir directory will be created if missing. But you can explicitly create directories using the '''mkdir''' command.&lt;br /&gt;
&lt;br /&gt;
 $ rclone mkdir swestore:/snic/YOUR_PROJECT_DIR/newdir&lt;br /&gt;
&lt;br /&gt;
= Removing files or directories =&lt;br /&gt;
&lt;br /&gt;
'''Beware''' that the command '''delete''' will recursively delete all file objects under specified path!&lt;br /&gt;
&lt;br /&gt;
To remove the file &amp;lt;code&amp;gt;dummyfile&amp;lt;/code&amp;gt; under &amp;lt;code&amp;gt;/snic/YOUR_PROJECT_DIR/newdir&amp;lt;/code&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
 $ rclone deletefile swestore:/snic/YOUR_PROJECT_DIR/newdir/dummyfile&lt;br /&gt;
&lt;br /&gt;
To remove a directory, they have to be empty, and you use the command&lt;br /&gt;
&lt;br /&gt;
 $ rclone rmdir swestore:/snic/YOUR_PROJECT_DIR/newdir/&lt;br /&gt;
&lt;br /&gt;
To remove '''all''' empty directories under a path, use&lt;br /&gt;
&lt;br /&gt;
 $ rclone rmdirs swestore:/snic/YOUR_PROJECT_DIR/newdir/&lt;br /&gt;
&lt;br /&gt;
To recursively remove '''all''' files under &amp;lt;code&amp;gt;/snic/YOUR_PROJECT_DIR/newdir&amp;lt;/code&amp;gt;, leaving the empty directory structure in place, '''be careful''';&lt;br /&gt;
&lt;br /&gt;
 $ rclone delete swestore:/snic/YOUR_PROJECT_DIR/newdir/&lt;br /&gt;
&lt;br /&gt;
'''Do not use''' the command purge, as that will '''delete everything''' under the path specified.&lt;br /&gt;
&lt;br /&gt;
= FAQ =&lt;br /&gt;
&lt;br /&gt;
'''Q''': I used &amp;lt;code&amp;gt;rclone purge&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;rclone delete&amp;lt;/code&amp;gt; and have now deleted all my files; can I get them back somehow?&lt;br /&gt;
: '''A''': No.&lt;/div&gt;</summary>
		<author><name>Robert Pilstål (NSC)</name></author>
		
	</entry>
	<entry>
		<id>https://snicdocs.nsc.liu.se/w/index.php?title=KTH_Certificate_Information&amp;diff=7220</id>
		<title>KTH Certificate Information</title>
		<link rel="alternate" type="text/html" href="https://snicdocs.nsc.liu.se/w/index.php?title=KTH_Certificate_Information&amp;diff=7220"/>
		<updated>2020-01-30T08:02:58Z</updated>

		<summary type="html">&lt;p&gt;Robert Pilstål (NSC): Correcting link as per RT#189423&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;For employees from KTH the procedure is as follows to be able to request certificates from the eScience(grid) certificate portal:&lt;br /&gt;
&lt;br /&gt;
# Go to KTHs IT support page: https://intra.kth.se/en/it/kontakta-it-support/ and ask them to give to the right to retrieve eScience(grid)-certificates using your KTH id.&lt;br /&gt;
# Follow the instructions on [[Requesting_a_grid_certificate_using_the_Digicert_SSO_Portal]]&lt;/div&gt;</summary>
		<author><name>Robert Pilstål (NSC)</name></author>
		
	</entry>
	<entry>
		<id>https://snicdocs.nsc.liu.se/w/index.php?title=Swestore-dCache&amp;diff=7214</id>
		<title>Swestore-dCache</title>
		<link rel="alternate" type="text/html" href="https://snicdocs.nsc.liu.se/w/index.php?title=Swestore-dCache&amp;diff=7214"/>
		<updated>2020-01-22T12:21:52Z</updated>

		<summary type="html">&lt;p&gt;Robert Pilstål (NSC): /* From a web browser */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Storage]]&lt;br /&gt;
[[Category:Swestore]]&lt;br /&gt;
[[Category:Swestore]]&lt;br /&gt;
[[Category:Swestore user guide]]&lt;br /&gt;
&lt;br /&gt;
Swestore is Research Data Storage Infrastructure operated by the Swedish National Infrastructure for Computing (SNIC). &lt;br /&gt;
&lt;br /&gt;
The resources provided by Swestore are made available through open procedures such that the best Swedish research is supported and new research is facilitated. The purpose of Swestore allocations, granted by Swedish National Allocations Committee (SNAC), is to provide large scale data storage for “live” or “working” research data, also known as active research data. &lt;br /&gt;
&lt;br /&gt;
Due to the VR funding, the free allocations on Swestore have some usage limitations.&lt;br /&gt;
* Swestore is NOT supposed to be used for backups and such requests for allocation will be rejected. Please, check with your university (home institution/organisation) IT department about backup services, strategies and policies in place. If such services do not exist or if you can’t access them for different reasons, please contact us at support@swestore.se;&lt;br /&gt;
* Swestore is NOT supposed to be used as archiving service, long-term storage or repository for “static” data. Once data is no longer in the process of change, and decision on which data should be retained shared and/or preserved has been taken, data should be moved toward appropriate data services. The higher education institutions are responsible for archiving and long-term preservation of research data produced by researchers employed by them;&lt;br /&gt;
&lt;br /&gt;
; Glossary&lt;br /&gt;
; Active (Research) data&lt;br /&gt;
: is data that is being worked on as part of research project and therefore subject to change. The files containing data will need to be accessed and amended or updated as new data is gathered or processed.&lt;br /&gt;
; Static (Research) data: is data that is no longer in the process of change and it can be prepared for preservation and reuse.&lt;br /&gt;
; Backup&lt;br /&gt;
: is a copy of the digital data to be stored and used as a replacement in case the main copy is either deleted or corrupted.&lt;br /&gt;
; Archive&lt;br /&gt;
:is a service to record, organise, and store (digital) items in optimal conditions, with standardised labelling to ensure their longevity and continued access. The service is based on application of metadata, archiving policies, records management, and digital preservation actions. Archivists make decisions on selection and retention of items which are usually governed by supporting policies.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Swestore is distributed across the SNIC centres [http://www.c3se.chalmers.se/ C3SE], [http://www.hpc2n.umu.se/ HPC2N], [http://www.lunarc.lu.se/ Lunarc], [http://www.nsc.liu.se/ NSC] and [http://www.uppmax.uu.se Uppmax]. Data is stored in two copies with each copy at a different SNIC centre. This enables the system to cope with a multitude of issues ranging from a simple crash of a storage element to losing an entire site while still providing access to the stored data. &lt;br /&gt;
&lt;br /&gt;
One of the major advantages to the distributed nature of Swestore is the excellent aggregated transfer rates possible. This is achieved by bypassing a central node and having transfers going directly to/from the storage elements if the selected transfer protocol allows it. Swestore can achieve aggregated transfer rates in excess of 100 Gigabit per second, but in practice this is limited by connectivity to the end user, each university or a limited number of files (typically max 1 Gbit/s per file/connection).&lt;br /&gt;
&lt;br /&gt;
To protect against silent data corruption the dCache storage system checksums all stored data and periodically verifies the data using this checksum.&lt;br /&gt;
&lt;br /&gt;
The dCache system does NOT yet provide protection against user errors like inadvertent file deletions.&lt;br /&gt;
&lt;br /&gt;
= Getting access to Swestore=&lt;br /&gt;
Before you can access Swestore you need to be a member of a storage project.&lt;br /&gt;
&lt;br /&gt;
== Apply for storage (for the PI) ==&lt;br /&gt;
All normal Swestore projects are managed using the [https://supr.snic.se SNIC User and Project Repository portal, SUPR]. Please follow the instructions on the [http://www.snic.se/resources/swestore/ Apply for storage on Swestore] page to apply for storage.&lt;br /&gt;
&lt;br /&gt;
== Apply for project membership (for all users) ==&lt;br /&gt;
&lt;br /&gt;
All project members must register in [https://supr.snic.se SUPR] and be added to the approved project by the PI. This can happen in multiple ways:&lt;br /&gt;
&lt;br /&gt;
* The PI can add you to a project&lt;br /&gt;
* You can request membership to a project:&lt;br /&gt;
** Log in to [https://supr.snic.se SUPR]&lt;br /&gt;
** Click on the ''Projects'' heading in the left hand menu.&lt;br /&gt;
** In the ''Request Membership in Project'' section of the page, fill in a project search criteria according to the on-page instructions and click '''Search for Project'''&lt;br /&gt;
** Locate the approriate project displayed and click '''Request''' button in the ''Request Membership'' column.&lt;br /&gt;
** The PI and any Co-PI will be notified of your request and approve/deny as they deem appropriate.&lt;br /&gt;
&lt;br /&gt;
When your project membership is approved by the PI the Swestore system will map an account for you and add access to the project storage directory. Please wait for up to 10 minutes for this information to be distributed to Swestore.&lt;br /&gt;
&lt;br /&gt;
== Finding the project storage directory name (for all users)==&lt;br /&gt;
&lt;br /&gt;
All Swestore projects are assigned a unique directory name, this is used to locate your storage area.&lt;br /&gt;
&lt;br /&gt;
To find the directory name for a storage project, perform these steps:&lt;br /&gt;
&lt;br /&gt;
* Log in to [https://supr.snic.se SUPR]&lt;br /&gt;
* Click on the project ID in the left hand menu.&lt;br /&gt;
* The project ''Directory Name'' is shown in the ''Basic Information'' section.&lt;br /&gt;
&lt;br /&gt;
The project storage area is available in the path '''/snic/directory_name/''' on Swestore.&lt;br /&gt;
&lt;br /&gt;
== Set your Swestore password (for users accessing with username/password authentication) ==&lt;br /&gt;
&lt;br /&gt;
The username/password access method is the most common authentication method. It requires you to set a password on your Swestore account.&lt;br /&gt;
&lt;br /&gt;
Follow the instruction on the page [[Setting your Swestore password]].&lt;br /&gt;
&lt;br /&gt;
== Acquire and manage certificate (for users accessing with certificate authentication) ==&lt;br /&gt;
&lt;br /&gt;
Certificate authentication is needed in some special cases, and more convenient for use in automation (ie. Robot certificates).&lt;br /&gt;
&lt;br /&gt;
Some communities require certificate authentication and such users might already have a certificate, that certificate is likely good to use with Swestore.&lt;br /&gt;
&lt;br /&gt;
If you need to use Certificate authentication, follow the instruction on the page [[Certificate Setup for Swestore]].&lt;br /&gt;
&lt;br /&gt;
= Using Swestore =&lt;br /&gt;
== Download and upload data ==&lt;br /&gt;
=== From the command line ===&lt;br /&gt;
&lt;br /&gt;
There are several command line tools capable of using the protocols provided by Swestore. For usage on SNIC clusters we recommend using the ARC tools which should be installed on all SNIC resources.&lt;br /&gt;
&lt;br /&gt;
As an integration point for building scripts and automated systems we suggest using the curl program and library.&lt;br /&gt;
&lt;br /&gt;
:; Interactive tools&lt;br /&gt;
:: Best suited for interactive use with various support for directory listings, wildcards etc.&lt;br /&gt;
::;Currently no suitable tools to recommend&lt;br /&gt;
:; Command-line tools&lt;br /&gt;
:: These tools are also suitable for scripting or automation.&lt;br /&gt;
::; rclone&lt;br /&gt;
::: Supports multiple protocols.&lt;br /&gt;
::: Swestore-specific documentation not written yet. See upstream documentation at https://rclone.org/webdav/&lt;br /&gt;
::: Use access URL: https://webdav.swestore.se:1443/&lt;br /&gt;
::; cURL&lt;br /&gt;
::: Please see the instructions for [[Accessing Swestore with cURL]]. We suggest using this as integration point for building scripts and automated systems.&lt;br /&gt;
::; davix&lt;br /&gt;
::: Swestore-specific documentation not written yet. See upstream documentation at https://davix.web.cern.ch/davix/docs/master/&lt;br /&gt;
::: Use access URL: davs://webdav.swestore.se:1443/&lt;br /&gt;
::; ARC&lt;br /&gt;
::: Certificate authentication only. Supports multiple protocols.&lt;br /&gt;
::: Please see the instructions for [[Accessing Swestore with the ARC client]].&lt;br /&gt;
::; gfal2&lt;br /&gt;
::: Certificate authentication only. Supports multiple protocols.&lt;br /&gt;
::: Swestore-specific documentation not written yet. See upstream documentation at https://dmc.web.cern.ch/projects/gfal-2/documentation&lt;br /&gt;
::: Use access URL: gsiftp://gsiftp.swestore.se/&lt;br /&gt;
::; https://duck.sh/&lt;br /&gt;
::: Command-line client for Windows/macOS/Linux (not documented yet)&lt;br /&gt;
&lt;br /&gt;
=== Using a GUI client ===&lt;br /&gt;
&lt;br /&gt;
Graphical User Interface (GUI) clients are known to work on some operating systems.&lt;br /&gt;
&lt;br /&gt;
:; Cyberduck&lt;br /&gt;
:: Please see the instructions for [[Accessing Swestore using Cyberduck]] '''Recommended method on macOS'''&lt;br /&gt;
:; WinSCP&lt;br /&gt;
:: Please see the instructions for [[Accessing Swestore using WinSCP]] '''Recommended method on Windows'''&lt;br /&gt;
&lt;br /&gt;
=== From a web browser ===&lt;br /&gt;
&lt;br /&gt;
Swestore is accessible in your web browser as a simple directory index interface at https://webdav.swestore.se/.&lt;br /&gt;
&lt;br /&gt;
Web browser access supports both username/password and certificate authentication.&lt;br /&gt;
&lt;br /&gt;
Projects are organized under the &amp;lt;code&amp;gt;/snic&amp;lt;/code&amp;gt; directory as &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://webdav.swestore.se/snic/DIRECTORY_NAME/&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== JavaScript WebDAV client ====  &lt;br /&gt;
&lt;br /&gt;
Swestore dCache can also be accessed in your browser, through a JavaScript client, over WebDAV at https://webdav.swestore.se/browser/ .&lt;br /&gt;
&lt;br /&gt;
=== Legacy documentation ===&lt;br /&gt;
&lt;br /&gt;
There are other clients/methods available, but not recommended for new deployments. See [[:Category:Swestore user guide]] for a complete list of documentation.&lt;br /&gt;
&lt;br /&gt;
== Enabled access protocols ==&lt;br /&gt;
A design criteria for Swestore is to provide the storage over a number of standardized and public protocols. There is no vendor specific client needed for access. &lt;br /&gt;
&lt;br /&gt;
:; GridFTP&lt;br /&gt;
:: Also called gsiftp. Well supported within Swestore.&lt;br /&gt;
:: Features: Transfer checksums. Direct transfer from/to storage pools for high speed transfers.&lt;br /&gt;
:: Access URL: gsiftp://gsiftp.swestore.se/&lt;br /&gt;
:; HTTP/WebDAV&lt;br /&gt;
:: Contender for being the recommended protocol for Swestore.&lt;br /&gt;
:: Features: Support in web browsers. Supports direct transfer of files from/to storage pools improving performance (varying support in clients).&lt;br /&gt;
::; Authenticated access&lt;br /&gt;
::: This is the normal read-write access.&lt;br /&gt;
::: Access URL: https://webdav.swestore.se/ (non-redirected)&lt;br /&gt;
::: Access URL: https://webdav.swestore.se:1443/ (redirected)&lt;br /&gt;
::: Access URL: https://webdav.swestore.se:2443/ (redirected reads)&lt;br /&gt;
::; Unauthenticated read-only access&lt;br /&gt;
::: For special cases only.&lt;br /&gt;
::: Access URL: http://webdav.swestore.se/ (unauthenticated, read-only, non-redirected)&lt;br /&gt;
::: Access URL: http://webdav.swestore.se:1080/ (unauthenticated, read-only, redirected)&lt;br /&gt;
::: Access URL: http://webdav.swestore.se:2080/ (unauthenticated, read-only, redirected reads)&lt;br /&gt;
:; NFSv4.1&lt;br /&gt;
:: Used by some communities, not recommended for general use&lt;br /&gt;
:; SRM - Storage Resource Manager&lt;br /&gt;
:: Used by some communities, not recommended for general use.&lt;br /&gt;
:: Access URL: srm://srm.swegrid.se/&lt;br /&gt;
:; Xrootd&lt;br /&gt;
:: Used by some communities, not recommended for general use&lt;br /&gt;
:; DCAP&lt;br /&gt;
:: Used by some communities, not recommended for general use&lt;br /&gt;
&lt;br /&gt;
== Usage monitoring ==&lt;br /&gt;
* On the project page in SUPR: https://supr.snic.se&lt;br /&gt;
* On the monitoring server for Swestore: http://status.swestore.se/munin/monitor/monitor/  (only accessible from .se-domains.&lt;br /&gt;
&lt;br /&gt;
= Support =&lt;br /&gt;
&lt;br /&gt;
If you have any issues using Swestore, please do not hesitate to contact [mailto:support@swestore.se support@swestore.se].&lt;/div&gt;</summary>
		<author><name>Robert Pilstål (NSC)</name></author>
		
	</entry>
</feed>