Page 1 of 1
Forum

Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!

Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.

Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is no translation for that post!




ApplePi-baker 223 b...
 
Share:
Notifications
Clear all

ApplePi-baker 223 backing up 128GB drive with less than 4GB used results in 98GB zip file


(@progers885)
New Member
Joined: 3 months ago
Posts: 3
Topic starter  

ApplePi-Baker
Version: 2.2.3 (Build 1)
(Helper Tool version 1.8.2)

OS Info: macOS
Version 10.14.6 (Build 18G9028)
x86-64 (64 bit application)

I have a raspeberry pi 3 with 128GB microsd card which after installing raspbian buster on I have shrunk the root filesystem down to 11GB:-
Filesystem    Size   Used Avail Use%   Mounted on
/dev/root      11G   3.5G  6.4G  35%    /

I have then created a ext4 partition in the free space of about 107GB which has had no data writen to it
Filesystem            Size   Used   Avail   Use%  Mounted on
/dev/mmcblk0p3 107G  61M   102G   1%     /media/pi/DATA

so there is about 4GB of data in total on the drive, after running ApplePi-Baker using the option to shrink to minimum size I have a zip file that is 98GB in size.

I have used ApplePi-Baker to create a backup of a 8GB microsd card (no partition changes) with buster installed and it produces a backup zip file that is 1.65GB in size which I have been able to recover without any problems; I noticed that during the recovery that it appears to create a full image to be written to the media whereas pi shrink recovers the shrunken image and relies on the pi  to expand the filesystem on boot, this is a significant time saver when using when recovering to large capacity media.

I have not tried a recovery of the 128GB backup.

My main use of ApplePi-Baker is to backup the root filesystem, the seperate partition for data is for torrents which can be recovered from other sources.

 

Regards

Paul

 


ReplyQuote
 Hans
(@hans)
Noble Member Admin
Joined: 8 years ago
Posts: 2005
 

Apologies for the late response ... 😊

APB will shrink the first EXT partition it finds, so maybe that's why it failed to shrink that EXT4 partition.
What does the partition table look like? Do you have more than 1 EXT partition?

In advanced view, right click the drive, and select "Copy partition info from selected disk", which copies it to the clipboard and you can paste it here in a message.

Should look something like this;

Partition Table Info of /dev/disk4

  Size: 4,026,531,840 Bytes (7,864,320 Sectors)

  Partitioning Layout: Master Boot Record (MBR)

  Partition 1: FAT32 Partition
  - Start Sector   = 32 (16,384 Bytes)
  - Partition Size = 7,864,288 (4,026,515,456 Bytes)

  Partition 2: Empty Partition

  Partition 3: Empty Partition

  Partition 4: Empty Partition

ReplyQuote
(@progers885)
New Member
Joined: 3 months ago
Posts: 3
Topic starter  

Hi,

As I said in the description, I created an extra partition; only copying the first partition it finds is ok; it would be good if the app could ignore any subsequent partitions and issue a warning.

Fairly easy to reproduce, just reduce the root partition down in size and create and extra ext4 partition in the free space (no need to put data into it), if you are going to do this I would suggest that you do it on an 8GB sd card as it takes hours on 128GB :)

deleting the extra partition prior to backup and the backup performs as expected.

Great app just what I was looking for; when there are problems and in a hurry, then recovering the image is a lot quicker than debugging what went wrong.

Partition table below as requested:-

/dev/disk6: Apple SDXC Reader Media (129 GB)
Read/Write
Internal Drive (Secure Digital)
Apple Built In SDXC Reader
Partitions:
▹ /dev/disk6s1 "boot" 268 MB Windows FAT32
▹ /dev/disk6s2 "Untitled 2" 11 GB Linux (Ext2/Ext3/Ext4)
▹ /dev/disk6s3 "Untitled 3" 117 GB Linux (Ext2/Ext3/Ext4)

 

regards

 

Paul

 


ReplyQuote
 Hans
(@hans)
Noble Member Admin
Joined: 8 years ago
Posts: 2005
 

Hi Paul,

The problem with some images is that they use Extended Partitions (which APB cannot resize), so I wasn't sure if that was the case or if you had 2 EXT4 partitions. 😉 

On that note: I think you selected the wrong option haha, you picked "Copy Structure to Clipboard" instead of "Copy partition table info from selected disk" (I typed it wrong as well).
The partition info would show what type of partition would have been used (MBR, Extended Partition, etc).

Anyhoo ... neither here nor there 😉 

I have been struggling with what partition to select in the past.
The downside of removing the partition is that when doing a restore (with resize), then the first partition would expand to max capacity, which would be undesired in your situation, since you would still need room for the 2nd EXT partition.

I'll try to pick this up as an idea (time and life does get in the way sometimes):
When more than one EXT partition is found, ask the user which one to shrink/expand - which could be a challenge for certain users, but it would help cases like this.
Not sure if you'd do an expand on restore though.
So I'm adding this to my "To-Do" list. 👍 

Note: I did a quick look to see if I could easily implement this, but alas, it will take quite a bit to do this.
Still on my To-Do list ... maybe time for APB v3? 😉 
(it takes a lot of work though)


ReplyQuote
(@progers885)
New Member
Joined: 3 months ago
Posts: 3
Topic starter  

Hi,

"The downside of removing the partition is that when doing a restore (with resize), then the first partition would expand to max capacity, which would be undesired in your situation, since you would still need room for the 2nd EXT partition."

is not a problem for me as I discovered I can use Balena Etcher to write the image from the APB backup zip;  I then have two options, one is to use gparted to change the partition sizes to what I want and if I am not adding partitions I can boot the sdcard on the pi and then use raspi-config to increase the root partition  to the size of the sdcard which is what it does when from the distribution image for the first time; this is a lot quicker than expanding the backup on the mac to the size of the sdcard and then writing this to the sdcard especially with a 128GB sd card.

Just a note for any followers of this topic, if you are going to use gparted on the pi to expand the root partition make sure that you install it before you make your backup as there is not enough free space to install gparted if you have not.

I thought about how you could implement multiple partitions in the backup but there are too many variables when recovering to a different size sd card and the beauty of your app is that its easy to use, thats why I thought a warning would suffice assuming you can skip the other extended partitions.

 

Best Regards

 

Paul


ReplyQuote


Like what you see and you'd like to help out? 

The best way to help is of course by assisting others with their questions here in the forum, but you can also help us out in other ways:

- Do your shopping at Amazon, it will not cost you anything extra but may generate a small commission for us,
- send a cup of coffee through PayPal ($5, $10, $20, or custom amount),
- become a Patreon,
- donate BitCoin (BTC), or BitCoinCash (BCH).

Share: