Tar

Revision as of 19:33, 27 November 2016 by Kerrache (talk | contribs)


This article is a draft

This is not a complete article: This is a draft, a work in progress that is intended to be published into an article, which may or may not be ready for inclusion in the main wiki. It should not necessarily be considered factual or authoritative.




This page is a draft ... Work in progress

How to prepare archives of your data before migration process?

Before starting the Data Migration from one place to another or between Compute Canada clusters or its regional partners, the users should start by preparing and archiving their Data in order to facilitate the migration process and improve the efficiency of the whole process. It is easier for the secure copy protocol to migrate one archive file of a reasonable size than migrating thousands of small files. To avoid any interruption or slowing down of the file system that can affect the migration process, it is recommended to transfer archives rather than the whole directory with all files and directories individually especially the directories with large number of files. In this page, you can find examples and more practical commands to prepare your archives and save time and increase the efficiency of the file transfer.

Why should you archive and compress your files?

Archiving your files reduces the total number of files you need to migrate and gives you more control of your data when it comes to move them from one place to another. In addition, the compression will reduce the space you need for your data and will speed up the migration process.

What is an archive or a tar-file?

An archive puts many files or directories together into a single file on your disk. You can restore individual files from the archive or the whole archive on any Unix-like system (Unix, Linux, MacOS, Cygwin). To create archives, some utilities like tar are used.

How do you archive files with the tar command?

The primary archiving utility is the tar command that bundles a bunch of files or directories together and generates a single file or archive file with .tar as the extension. This command is an archiving utility designed to store and extract files from an archive file known as a tar-file: [your_archive_name.tar].

Depending on the options and arguments invoked (see below), this command can create an archive, add files to an existing archive, list the content of an archive, extract one or more files, or extract the whole archive, etc ... The use of a directory name always implies that all the sub-directories below should be included in the final archive except if the command is invoked with --exclude</option> that will not take into account the specified files when the archive is created.