LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-23-2020, 06:01 AM   #1
dezix
Member
 
Registered: Sep 2017
Location: Frog's Land
Distribution: Debian
Posts: 51

Rep: Reputation: Disabled
Partclone : option -c --clone (what is it for?)


Hi!

Using Partclone to save a part to an image file.

As manpage shows only :

Code:
...
-c, --clone
  Save partition to the special image format.
...

What does/changes the --clone option ?

What occurs if missing ?

Please,
put focus on ext4 FS if possible.


Thanks for sharing knowledge ;-)
 
Old 05-23-2020, 06:39 AM   #2
cordx
Member
 
Registered: Oct 2018
Location: texas
Distribution: bodhi 5.1.0
Posts: 580

Rep: Reputation: 144Reputation: 144
Quote:
Originally Posted by dezix View Post
What does/changes the --clone option ?
are you asking how issuing the command with the --clone option is different from issuing it with the -c option?

using the example from the man page:
partclone.ext3 -c -d -s /dev/hda1 -o hda1.img
are you asking how that is different from:
partclone.ext3 --clone -d -s /dev/hda1 -o hda1.img
?

Quote:
Originally Posted by dezix View Post
What occurs if missing ?
it is unclear what you are asking here. what occurs if the -c or --clone option is missing? can you be more specific?

Quote:
Originally Posted by dezix View Post
Please, put focus on ext4 FS if possible.
that part is covered fairly well in the man page.
Quote:
All partclone utils could be run like partclone.[fstype] is very smiliar fsck or mkfs. For example, for backup/restore hfsplus, just run partclone.hfsp

ext2, ext3, ext4 partclone.[ext2|ext3|ext4]
returning to the example above:
partclone.ext3 -c -d -s /dev/hda1 -o hda1.img
.ext4 (or 3 or 2 or any other supported file system) has to be appended to the partclone command to tell the system what it will be cloning or restoring.

Last edited by cordx; 05-23-2020 at 06:42 AM. Reason: clarity
 
Old 05-23-2020, 08:32 AM   #3
dezix
Member
 
Registered: Sep 2017
Location: Frog's Land
Distribution: Debian
Posts: 51

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by cordx View Post
are you asking how issuing the command with the --clone option is different from issuing it with the -c option?
I understand well that -c is the short syntax for --clone

What I'm asking is : " What means special image format "

This isn't explicitly explain in manpage and I didn't found further explanations anywhere else.

That's why I'm asking here.
 
Old 05-23-2020, 09:39 AM   #4
shruggy
Member
 
Registered: Mar 2020
Posts: 874

Rep: Reputation: Disabled
For starters, contrary to what its manual page says, the option -c is never used by partclone.dd. It only makes sense for partclone.[fstype] or partclone.imager. This allows just using partclone.restore when restoring the captured image to another device. In this case, the used fstype is recorded in the image, so specifying it when restoring is unnecessary.

Again, contrary to what its manual page says, partclone.restore cannot restore images captured by partclone.dd or by partclone.[fstype] without -c. For such images, use partclone.dd / partclone.[fstype] -r, accordingly. Obviously, you need to know how the image was captured to be able to restore it successfully in this case.

Further, -c cannot be used when capturing an image from stdin.

Now, see this my post in the FOG Project forum. HTH.
 
2 members found this post helpful.
Old 05-23-2020, 09:55 AM   #5
dezix
Member
 
Registered: Sep 2017
Location: Frog's Land
Distribution: Debian
Posts: 51

Original Poster
Rep: Reputation: Disabled
@shruggy

Thanks a lot,
that's exactly what I was looking for.
 
Old 05-24-2020, 01:35 PM   #6
dezix
Member
 
Registered: Sep 2017
Location: Frog's Land
Distribution: Debian
Posts: 51

Original Poster
Rep: Reputation: Disabled
I will just add the result of a test made with Partclone : v0.3.13
to save a sdxy part to an image file .pcl or .img without the -c option

This doesn't work => partclone only shows a list of available options as a wrong command has been typed.

So I will conclude that the -c option is required to save a partition as an image file.

Last edited by dezix; 05-24-2020 at 01:36 PM.
 
1 members found this post helpful.
Old 05-25-2020, 07:33 AM   #7
shruggy
Member
 
Registered: Mar 2020
Posts: 874

Rep: Reputation: Disabled
Thanks for testing it, I stand corrected then. FYI, partclone.imager in 0.3.13 is broken (one important line was commented out in the source), but the fix is simple: patch it in again . It was recently fixed in the upstream git repo, too.
 
Old 05-25-2020, 09:35 AM   #8
dezix
Member
 
Registered: Sep 2017
Location: Frog's Land
Distribution: Debian
Posts: 51

Original Poster
Rep: Reputation: Disabled
I've even tested file name without extension too,
Partclone doesn't accept it no more.

In fact I suspect that Partclone without -c is expecting a device as -o argument
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Open-spec SBC is a clone of a clone of a clone of a Raspberry Pi 3 LXer Syndicated Linux News 0 04-25-2018 04:56 PM
LXer: How to use partclone to create a "smart" partition backup LXer Syndicated Linux News 0 03-05-2018 06:09 PM
[SOLVED] Need help on partclone... mangya Linux - Newbie 2 05-21-2016 05:43 AM
[SOLVED] mount partclone.ntfs. hack3rcon Linux - Desktop 1 10-06-2015 05:32 AM
X-based alternative to Partclone? littlebigman Linux - Software 4 09-01-2010 05:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration