Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

No one wants war. -- Kirk, "Errand of Mercy", stardate 3201.7


computers / comp.sys.raspberry-pi / Re: backing up a PI SD card..

SubjectAuthor
* backing up a PI SD card..The Natural Philosopher
+* Re: backing up a PI SD card..Knute Johnson
|`* Re: backing up a PI SD card..The Natural Philosopher
| `* Re: backing up a PI SD card..Newyana2
|  `* Re: backing up a PI SD card..The Natural Philosopher
|   `* Re: backing up a PI SD card..Newyana2
|    +* Re: backing up a PI SD card..The Natural Philosopher
|    |+* Re: backing up a PI SD card..Computer Nerd Kev
|    ||`* Re: backing up a PI SD card..The Natural Philosopher
|    || +* Re: backing up a PI SD card..Martin Gregorie
|    || |`- Re: backing up a PI SD card..The Natural Philosopher
|    || +* Re: backing up a PI SD card..Theo
|    || |`- Re: backing up a PI SD card..The Natural Philosopher
|    || +* Re: backing up a PI SD card..Computer Nerd Kev
|    || |`- Re: backing up a PI SD card..The Natural Philosopher
|    || `- Re: backing up a PI SD card..Anssi Saari
|    |`* Re: backing up a PI SD card..Martin Gregorie
|    | +* Re: backing up a PI SD card..druck
|    | |+- Re: backing up a PI SD card..The Natural Philosopher
|    | |`* Re: backing up a PI SD card..Jim Jackson
|    | | `- Re: backing up a PI SD card..The Natural Philosopher
|    | `- Re: backing up a PI SD card..The Natural Philosopher
|    `* Re: backing up a PI SD card..Charlie Gibbs
|     `- Re: backing up a PI SD card..The Natural Philosopher
`- Re: backing up a PI SD card..Hermann Riemann

1
backing up a PI SD card..

<ue6gb9$ad15$3@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7231&group=comp.sys.raspberry-pi#7231

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp...@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.sys.raspberry-pi
Subject: backing up a PI SD card..
Date: Sun, 17 Sep 2023 10:19:37 +0100
Organization: A little, after lunch
Lines: 17
Message-ID: <ue6gb9$ad15$3@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 17 Sep 2023 09:19:37 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="315702974463422239a68aede622b53a";
logging-data="341029"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/daAaL+vfnpMApOsO1F1H9ynYvPDyMdZI="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:u0i+Z8l5IPw3REIkXhdPfQxpbTs=
Content-Language: en-GB
 by: The Natural Philosop - Sun, 17 Sep 2023 09:19 UTC

It occurs to me that essentially a copy of the contents of the two PI
partitions would be enough, together with an install of Raspios,
followed by a copy back to the fresh SD, to clone a setup.

It seems too easy. What am I missing?

--
“It is not the truth of Marxism that explains the willingness of
intellectuals to believe it, but the power that it confers on
intellectuals, in their attempts to control the world. And since...it is
futile to reason someone out of a thing that he was not reasoned into,
we can conclude that Marxism owes its remarkable power to survive every
criticism to the fact that it is not a truth-directed but a
power-directed system of thought.”
Sir Roger Scruton

Re: backing up a PI SD card..

<ue7mvp$h5ck$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7256&group=comp.sys.raspberry-pi#7256

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: knute2...@585ranch.com (Knute Johnson)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: backing up a PI SD card..
Date: Sun, 17 Sep 2023 15:19:05 -0500
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <ue7mvp$h5ck$1@dont-email.me>
References: <ue6gb9$ad15$3@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 17 Sep 2023 20:19:06 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="93d0f4dc463fc3a8b2ea1d022f3db4c5";
logging-data="562580"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19xjLkiPfSpwCITi91FANOr"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:yzc/gIM33pNAv2rW70lxsgVZGX4=
In-Reply-To: <ue6gb9$ad15$3@dont-email.me>
Content-Language: en-US
 by: Knute Johnson - Sun, 17 Sep 2023 20:19 UTC

On 9/17/23 04:19, The Natural Philosopher wrote:
>
> It occurs to me that essentially a copy of the contents of the two PI
> partitions would be enough, together with an install of Raspios,
> followed by a copy back to the fresh SD, to clone a setup.
>
> It seems too easy. What am I missing?
>
>

Raspberry -> Accessories -> SD Card Copier

--

Knute Johnson

Re: backing up a PI SD card..

<ue97ia$1n8d4$2@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7272&group=comp.sys.raspberry-pi#7272

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp...@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: backing up a PI SD card..
Date: Mon, 18 Sep 2023 11:08:10 +0100
Organization: A little, after lunch
Lines: 24
Message-ID: <ue97ia$1n8d4$2@dont-email.me>
References: <ue6gb9$ad15$3@dont-email.me> <ue7mvp$h5ck$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 18 Sep 2023 10:08:10 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="28dd092dab19d7f9bc921ee7b9640cb6";
logging-data="1810852"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/W87d0DrE9zXnxob8CcgWqH2yFbuwvQP8="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:bd74TsiWjyG2FhKNYgEcd9oFOC8=
Content-Language: en-GB
In-Reply-To: <ue7mvp$h5ck$1@dont-email.me>
 by: The Natural Philosop - Mon, 18 Sep 2023 10:08 UTC

On 17/09/2023 21:19, Knute Johnson wrote:
> On 9/17/23 04:19, The Natural Philosopher wrote:
>>
>> It occurs to me that essentially a copy of the contents of the two PI
>> partitions would be enough, together with an install of Raspios,
>> followed by a copy back to the fresh SD, to clone a setup.
>>
>> It seems too easy. What am I missing?
>>
>>
>
> Raspberry -> Accessories -> SD Card Copier
>
What has a raspberry to do with this?

--
“People believe certain stories because everyone important tells them,
and people tell those stories because everyone important believes them.
Indeed, when a conventional wisdom is at its fullest strength, one’s
agreement with that conventional wisdom becomes almost a litmus test of
one’s suitability to be taken seriously.”

Paul Krugman

Re: backing up a PI SD card..

<ue9hro$1p8t7$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7293&group=comp.sys.raspberry-pi#7293

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Newya...@invalid.nospam (Newyana2)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: backing up a PI SD card..
Date: Mon, 18 Sep 2023 09:03:00 -0400
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <ue9hro$1p8t7$1@dont-email.me>
References: <ue6gb9$ad15$3@dont-email.me> <ue7mvp$h5ck$1@dont-email.me> <ue97ia$1n8d4$2@dont-email.me>
Injection-Date: Mon, 18 Sep 2023 13:03:53 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="24220f013f069af5c801e9af9703e9c2";
logging-data="1876903"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+IBqMsdlLzbKhpHsIksWjIBI009WSrvEo="
Cancel-Lock: sha1:swWVHOgyhu2yMDIli60zEGA1aDY=
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-Priority: 3
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MSMail-Priority: Normal
 by: Newyana2 - Mon, 18 Sep 2023 13:03 UTC

"The Natural Philosopher" <tnp@invalid.invalid> wrote

| > Raspberry -> Accessories -> SD Card Copier
| >
| What has a raspberry to do with this?
| Start menu. The raspberry icon in lower left.
You didn't say which Pi you have, so you may not
have that icon or the copier software.

Re: backing up a PI SD card..

<ue9jji$1pgu7$3@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7296&group=comp.sys.raspberry-pi#7296

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp...@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: backing up a PI SD card..
Date: Mon, 18 Sep 2023 14:33:38 +0100
Organization: A little, after lunch
Lines: 24
Message-ID: <ue9jji$1pgu7$3@dont-email.me>
References: <ue6gb9$ad15$3@dont-email.me> <ue7mvp$h5ck$1@dont-email.me>
<ue97ia$1n8d4$2@dont-email.me> <ue9hro$1p8t7$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 18 Sep 2023 13:33:38 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="28dd092dab19d7f9bc921ee7b9640cb6";
logging-data="1885127"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18AwSkCARaG7cGiZqJ7iqUMCMPhWCpV9y8="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:QolxTsrAD7IbY4JHe9YBOZll0dU=
Content-Language: en-GB
In-Reply-To: <ue9hro$1p8t7$1@dont-email.me>
 by: The Natural Philosop - Mon, 18 Sep 2023 13:33 UTC

On 18/09/2023 14:03, Newyana2 wrote:
> "The Natural Philosopher" <tnp@invalid.invalid> wrote
>
> | > Raspberry -> Accessories -> SD Card Copier
> | >
> | What has a raspberry to do with this?
> |
> Start menu. The raspberry icon in lower left.

??? Icon? On a headless Pi Zero?

> You didn't say which Pi you have, so you may not
> have that icon or the copier software.
>
Pi Zero

>

--
The lifetime of any political organisation is about three years before
its been subverted by the people it tried to warn you about.

Anon.

Re: backing up a PI SD card..

<ueb0a6$25l6n$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7312&group=comp.sys.raspberry-pi#7312

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Newya...@invalid.nospam (Newyana2)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: backing up a PI SD card..
Date: Mon, 18 Sep 2023 22:15:47 -0400
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <ueb0a6$25l6n$1@dont-email.me>
References: <ue6gb9$ad15$3@dont-email.me> <ue7mvp$h5ck$1@dont-email.me> <ue97ia$1n8d4$2@dont-email.me> <ue9hro$1p8t7$1@dont-email.me> <ue9jji$1pgu7$3@dont-email.me>
Injection-Date: Tue, 19 Sep 2023 02:16:39 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b475839c354987e3f767cdf9ccb7cdc8";
logging-data="2282711"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+9arXugBh5H5Zy8H0HkxoMkERtzTqUMfc="
Cancel-Lock: sha1:3mySxJ27dLwYm8n0cVbJTWJC2jA=
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
 by: Newyana2 - Tue, 19 Sep 2023 02:15 UTC

"The Natural Philosopher" <tnp@invalid.invalid> wrote

| > |
| > Start menu. The raspberry icon in lower left.
| | ??? Icon? On a headless Pi Zero?
| Ah. You might have said that in the first place. It
doesn't make much sense to ask for help and then
be difficult with people who try to help. I gather you
only posted to argue.

Re: backing up a PI SD card..

<uebhpo$287vi$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7314&group=comp.sys.raspberry-pi#7314

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp...@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: backing up a PI SD card..
Date: Tue, 19 Sep 2023 08:15:03 +0100
Organization: A little, after lunch
Lines: 39
Message-ID: <uebhpo$287vi$1@dont-email.me>
References: <ue6gb9$ad15$3@dont-email.me> <ue7mvp$h5ck$1@dont-email.me>
<ue97ia$1n8d4$2@dont-email.me> <ue9hro$1p8t7$1@dont-email.me>
<ue9jji$1pgu7$3@dont-email.me> <ueb0a6$25l6n$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 19 Sep 2023 07:15:04 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="22666355f8644668452f6be22c6c2186";
logging-data="2367474"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+VSShK961WVLJgeInICCabiEZt02PrzvY="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:Cd46F5FYiCjF6G/sldZdz02nmXg=
In-Reply-To: <ueb0a6$25l6n$1@dont-email.me>
Content-Language: en-GB
 by: The Natural Philosop - Tue, 19 Sep 2023 07:15 UTC

On 19/09/2023 03:15, Newyana2 wrote:
> "The Natural Philosopher" <tnp@invalid.invalid> wrote
>
> | > |
> | > Start menu. The raspberry icon in lower left.
> |
> | ??? Icon? On a headless Pi Zero?
> |
> Ah. You might have said that in the first place. It
> doesn't make much sense to ask for help and then
> be difficult with people who try to help. I gather you
> only posted to argue.
>
>
No. I am trying to establish whether one can, in essence, make a
bootable PI SD card by taking a raw card, creating the two partitions on
it and loading it up with files, or whether there is the equivalent of a
boot sector which would mandate the use of e.g. dd to create it

Naturally all the documentation assumes a windows numpty and shows you
how to stamp the SD card with an image.

You assumed I wanted to clone the card. I don't. I want to back one up
without using DD because, as the concurrent thread has identified, the
PI expands the file system to the whole card and that makes for a big image.
I'd rather back it up as files if possible.

If at some future date I need to recreate it, instead of dd-ing the
image, I would prefer to create the two partitions and populate them
from the tarball.

--
There is nothing a fleet of dispatchable nuclear power plants cannot do
that cannot be done worse and more expensively and with higher carbon
emissions and more adverse environmental impact by adding intermittent
renewable energy.

Re: backing up a PI SD card..

<650965c6@news.ausics.net>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7318&group=comp.sys.raspberry-pi#7318

 copy link   Newsgroups: comp.sys.raspberry-pi
Message-ID: <650965c6@news.ausics.net>
From: not...@telling.you.invalid (Computer Nerd Kev)
Subject: Re: backing up a PI SD card..
Newsgroups: comp.sys.raspberry-pi
References: <ue6gb9$ad15$3@dont-email.me> <ue7mvp$h5ck$1@dont-email.me> <ue97ia$1n8d4$2@dont-email.me> <ue9hro$1p8t7$1@dont-email.me> <ue9jji$1pgu7$3@dont-email.me> <ueb0a6$25l6n$1@dont-email.me> <uebhpo$287vi$1@dont-email.me>
User-Agent: tin/2.0.1-20111224 ("Achenvoir") (UNIX) (Linux/2.4.31 (i686))
NNTP-Posting-Host: news.ausics.net
Date: 19 Sep 2023 19:11:34 +1000
Organization: Ausics - https://ausics.net
Lines: 22
X-Complaints: abuse@ausics.net
Path: i2pn2.org!i2pn.org!news.bbs.nz!news.ausics.net!not-for-mail
 by: Computer Nerd Kev - Tue, 19 Sep 2023 09:11 UTC

The Natural Philosopher <tnp@invalid.invalid> wrote:
> No. I am trying to establish whether one can, in essence, make a
> bootable PI SD card by taking a raw card, creating the two partitions on
> it and loading it up with files,

Yes. In fact if you set the OS up from scratch you don't even need
two partitions, just one FAT32 parition with the boot files
required by the Pi.

I set up a Linux system to boot off the FAT32 parition then run in
a tmpfs. So instead of an image file there's just a ZIP archive
which needs to be unpacked to the root of a FAT32-formatted SD
card. No image writer tool required, and no worries about partition
sizes.

The Pi doesn't need anything like a boot sector. The firmware is
smart enough to find the boot files on the filesystem, provided
it's FAT32.

--
__ __
#_ < |\| |< _#

Re: backing up a PI SD card..

<uebq0s$29kan$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7321&group=comp.sys.raspberry-pi#7321

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp...@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: backing up a PI SD card..
Date: Tue, 19 Sep 2023 10:35:23 +0100
Organization: A little, after lunch
Lines: 53
Message-ID: <uebq0s$29kan$1@dont-email.me>
References: <ue6gb9$ad15$3@dont-email.me> <ue7mvp$h5ck$1@dont-email.me>
<ue97ia$1n8d4$2@dont-email.me> <ue9hro$1p8t7$1@dont-email.me>
<ue9jji$1pgu7$3@dont-email.me> <ueb0a6$25l6n$1@dont-email.me>
<uebhpo$287vi$1@dont-email.me> <650965c6@news.ausics.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 19 Sep 2023 09:35:24 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="22666355f8644668452f6be22c6c2186";
logging-data="2412887"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18u7Fg8QIKOyOPF6tdTAE++lMRQup89geE="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:L+SOBJz7Czqcj4hONrqsFGBW3UU=
In-Reply-To: <650965c6@news.ausics.net>
Content-Language: en-GB
 by: The Natural Philosop - Tue, 19 Sep 2023 09:35 UTC

On 19/09/2023 10:11, Computer Nerd Kev wrote:
> The Natural Philosopher <tnp@invalid.invalid> wrote:
>> No. I am trying to establish whether one can, in essence, make a
>> bootable PI SD card by taking a raw card, creating the two partitions on
>> it and loading it up with files,
>
> Yes. In fact if you set the OS up from scratch you don't even need
> two partitions, just one FAT32 parition with the boot files
> required by the Pi.
>
> I set up a Linux system to boot off the FAT32 parition then run in
> a tmpfs. So instead of an image file there's just a ZIP archive
> which needs to be unpacked to the root of a FAT32-formatted SD
> card. No image writer tool required, and no worries about partition
> sizes.
>
> The Pi doesn't need anything like a boot sector. The firmware is
> smart enough to find the boot files on the filesystem, provided
> it's FAT32.
>

I suppose that needs to be the first partition?
The other question why always gets me on backups is how many of the
directories in the root partition can safely be ignored?

/sys, /proc, /run would seem to be created by the machine at boot time,
and shouldn't be created as subdirs of the root partition...or should
the directories be created, but empty?

So putatively one might back up everything in / except /run, /proc &
/sys, including /boot, plonk a shiny new SD card in a host computer,
create a VFAT partition of say 256MB, and the rest as ext4, untar the
archive into the ext4 partition and move the entire contents of /boot
onto the VFAT, shove the card in a pi , apply power, and Robert should
be a relative?

The vfat partition will get mounted on the (now empty) /boot mount
point, and everything else will be where it ought to be, and /run /sys
and /proc will get generated by the boot process?

What about /dev? Is that dynamically created or not?

--
"Anyone who believes that the laws of physics are mere social
conventions is invited to try transgressing those conventions from the
windows of my apartment. (I live on the twenty-first floor.) "

Alan Sokal

Re: backing up a PI SD card..

<uecrd4$2fib4$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7326&group=comp.sys.raspberry-pi#7326

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mar...@mydomain.invalid (Martin Gregorie)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: backing up a PI SD card..
Date: Tue, 19 Sep 2023 19:05:08 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 66
Message-ID: <uecrd4$2fib4$1@dont-email.me>
References: <ue6gb9$ad15$3@dont-email.me> <ue7mvp$h5ck$1@dont-email.me>
<ue97ia$1n8d4$2@dont-email.me> <ue9hro$1p8t7$1@dont-email.me>
<ue9jji$1pgu7$3@dont-email.me> <ueb0a6$25l6n$1@dont-email.me>
<uebhpo$287vi$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 19 Sep 2023 19:05:08 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="458b9cdd4dea73e5a0621700f11c28a5";
logging-data="2607460"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18kn4KeFEM7kCVwausqRr71RpSRkPq+Y1g="
User-Agent: Pan/0.149 (Bellevue; 4c157ba git@gitlab.gnome.org:GNOME/pan.git)
Cancel-Lock: sha1:YomzLt2di2dYpsafFhVH9wvpmrE=
 by: Martin Gregorie - Tue, 19 Sep 2023 19:05 UTC

On Tue, 19 Sep 2023 08:15:03 +0100, The Natural Philosopher wrote:

> On 19/09/2023 03:15, Newyana2 wrote:
>> "The Natural Philosopher" <tnp@invalid.invalid> wrote
>>
>> | > |
>> | > Start menu. The raspberry icon in lower left. |
>> | ??? Icon? On a headless Pi Zero?
>> |
>> Ah. You might have said that in the first place. It
>> doesn't make much sense to ask for help and then be difficult with
>> people who try to help. I gather you only posted to argue.
>>
>>
> No. I am trying to establish whether one can, in essence, make a
> bootable PI SD card by taking a raw card, creating the two partitions on
> it and loading it up with files, or whether there is the equivalent of a
> boot sector which would mandate the use of e.g. dd to create it
>
> Naturally all the documentation assumes a windows numpty and shows you
> how to stamp the SD card with an image.
>
> You assumed I wanted to clone the card. I don't. I want to back one up
> without using DD because, as the concurrent thread has identified, the
> PI expands the file system to the whole card and that makes for a big
> image.
> I'd rather back it up as files if possible.
>
> If at some future date I need to recreate it, instead of dd-ing the
> image, I would prefer to create the two partitions and populate them
> from the tarball.

Take a look at 'rsync' - its my go-to tool for backing up complete Linux
filing systems, specific partitions or lists of files and partitions to as
a named directory structure on a backup disk.

It is designed make the backup directory structure identical to the
current list of files and directories you ask it to back up, IOW, if you
rerun the sa,me command a week later it will remove any files and
directories from the previous backup session, replace any files and
directories that have been changed and add any new files and directories.

Consequently, subsequent runs will usually be much faster than the initial
backup.

Want to keep older backups? Just use a cycle of backup files. SD-cards or
USB-connected disks: I back up entire Linux file systems to a cycle of two
1TB WD Essentials portable disks, and do the backup immediately before the
weekly Linux software update.One 1TB disk is enough to hold complete
backup cycles for both my house server this laptop and one or more RPi
backups.

Retrieving whole partition contents, directories and/or files from these
backups is simple: simply mount the backup volume and copy anything you've
lost back to where it should be on your computer's filing system.

rsync manuals and software are in included in most mainstream Linux
distros.
HTH

--

Martin | martin at
Gregorie | gregorie dot org

Re: backing up a PI SD card..

<uecrti$2fib4$2@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7327&group=comp.sys.raspberry-pi#7327

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mar...@mydomain.invalid (Martin Gregorie)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: backing up a PI SD card..
Date: Tue, 19 Sep 2023 19:13:54 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 43
Message-ID: <uecrti$2fib4$2@dont-email.me>
References: <ue6gb9$ad15$3@dont-email.me> <ue7mvp$h5ck$1@dont-email.me>
<ue97ia$1n8d4$2@dont-email.me> <ue9hro$1p8t7$1@dont-email.me>
<ue9jji$1pgu7$3@dont-email.me> <ueb0a6$25l6n$1@dont-email.me>
<uebhpo$287vi$1@dont-email.me> <650965c6@news.ausics.net>
<uebq0s$29kan$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 19 Sep 2023 19:13:54 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="458b9cdd4dea73e5a0621700f11c28a5";
logging-data="2607460"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/hcU6BZS3J2iX4gz+0nehZ4SpsHVqWoqI="
User-Agent: Pan/0.149 (Bellevue; 4c157ba git@gitlab.gnome.org:GNOME/pan.git)
Cancel-Lock: sha1:0/OMTNMTtXs65IIILXEExvUCiHU=
 by: Martin Gregorie - Tue, 19 Sep 2023 19:13 UTC

On Tue, 19 Sep 2023 10:35:23 +0100, The Natural Philosopher wrote:

> On 19/09/2023 10:11, Computer Nerd Kev wrote:
>> The Natural Philosopher <tnp@invalid.invalid> wrote:
>>> No. I am trying to establish whether one can, in essence, make a
>>> bootable PI SD card by taking a raw card, creating the two partitions
>>> on it and loading it up with files,
>>
>> Yes. In fact if you set the OS up from scratch you don't even need two
>> partitions, just one FAT32 parition with the boot files required by the
>> Pi.
>>
>> I set up a Linux system to boot off the FAT32 parition then run in a
>> tmpfs. So instead of an image file there's just a ZIP archive which
>> needs to be unpacked to the root of a FAT32-formatted SD card. No image
>> writer tool required, and no worries about partition sizes.
>>
>> The Pi doesn't need anything like a boot sector. The firmware is smart
>> enough to find the boot files on the filesystem, provided it's FAT32.
>>
>>
> I suppose that needs to be the first partition?
>
Nope: just whatever partition the RPi installer configured to be the boot
partition.

> So putatively one might back up everything in / except /run, /proc &
> /sys, including /boot, plonk a shiny new SD card in a host computer,
> create a VFAT partition of say 256MB, and the rest as ext4, untar the
> archive into the ext4 partition and move the entire contents of /boot
> onto the VFAT, shove the card in a pi , apply power, and Robert should
> be a relative?
>
Just tell dd to copy everything from the source SD card to the new one. If
the latter card is bigger,use parted to extend the new ext4 partition and
to format the new sectors.
>

--

Martin | martin at
Gregorie | gregorie dot org

Re: backing up a PI SD card..

<ued0r2$2gotm$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7329&group=comp.sys.raspberry-pi#7329

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: new...@druck.org.uk (druck)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: backing up a PI SD card..
Date: Tue, 19 Sep 2023 21:37:53 +0100
Organization: A noiseless patient Spider
Lines: 50
Message-ID: <ued0r2$2gotm$1@dont-email.me>
References: <ue6gb9$ad15$3@dont-email.me> <ue7mvp$h5ck$1@dont-email.me>
<ue97ia$1n8d4$2@dont-email.me> <ue9hro$1p8t7$1@dont-email.me>
<ue9jji$1pgu7$3@dont-email.me> <ueb0a6$25l6n$1@dont-email.me>
<uebhpo$287vi$1@dont-email.me> <uecrd4$2fib4$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 19 Sep 2023 20:37:54 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ad6d574f745b2b65107b46766b0bcab0";
logging-data="2646966"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18NkvaEbWQOvT4Fk0CFn/3j"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:UI0SSaD1KtN1Xzvr4WyfKHyQoRo=
In-Reply-To: <uecrd4$2fib4$1@dont-email.me>
X-Antivirus-Status: Clean
X-Antivirus: Avast (VPS 230917-2, 17/9/2023), Outbound message
Content-Language: en-GB
 by: druck - Tue, 19 Sep 2023 20:37 UTC

On 19/09/2023 20:05, Martin Gregorie wrote:
> On Tue, 19 Sep 2023 08:15:03 +0100, The Natural Philosopher wrote:
>> No. I am trying to establish whether one can, in essence, make a
>> bootable PI SD card by taking a raw card, creating the two partitions on
>> it and loading it up with files, or whether there is the equivalent of a
>> boot sector which would mandate the use of e.g. dd to create it

> Take a look at 'rsync' - its my go-to tool for backing up complete Linux
> filing systems, specific partitions or lists of files and partitions to as
> a named directory structure on a backup disk.
>
> It is designed make the backup directory structure identical to the
> current list of files and directories you ask it to back up, IOW, if you
> rerun the sa,me command a week later it will remove any files and
> directories from the previous backup session, replace any files and
> directories that have been changed and add any new files and directories.
>
> Consequently, subsequent runs will usually be much faster than the initial
> backup.

Here's the rsync options I used to backup the partitions, firstly the
FAT partition which accounts for the lower resolution of timestamps

rsync -vax --stats --modify-window=2 --delete /boot/ <boot_backup_dir>

And the main partition with the exclusions to prevent pseudo filing
systems and temporary stuff being included when backing up live systems,
some of it shouldn't be necessary but turns out is needed

rsync -vaxHAX --stats --numeric-ids --delete --delete-excluded
--exclude=/tmp/*
--exclude=/run/*
--include=/var/lock
--exclude=/var/run
--exclude=/var/swap
--exclude=/var/cache/*
--exclude=/var/tmp/*
--exclude=/var/lib/machines/*/var/cache/
--exclude=/var/lib/mlocate/*
--exclude=/var/lib/nginx/fastcgi/*
--exclude=/var/log/journal/*
--exclude=/var/log/Xorg.*
--exclude=/lost+found/*
--exclude=*/.cache
--exclude=*/__pycache__
--exclude=*/chromium/hyphen-data/
--exclude=*/.config/chromium/*Cache*/*
/ <root_backup_dir>

---druck

Re: backing up a PI SD card..

<mWk*VkOqz@news.chiark.greenend.org.uk>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7330&group=comp.sys.raspberry-pi#7330

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!news.nntp4.net!nntp.terraraq.uk!nntp-feed.chiark.greenend.org.uk!ewrotcd!.POSTED.chiark.greenend.org.uk!not-for-mail
From: theom+n...@chiark.greenend.org.uk (Theo)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: backing up a PI SD card..
Date: 19 Sep 2023 21:55:24 +0100 (BST)
Organization: University of Cambridge, England
Message-ID: <mWk*VkOqz@news.chiark.greenend.org.uk>
References: <ue6gb9$ad15$3@dont-email.me> <ue7mvp$h5ck$1@dont-email.me> <ue97ia$1n8d4$2@dont-email.me> <ue9hro$1p8t7$1@dont-email.me> <ue9jji$1pgu7$3@dont-email.me> <ueb0a6$25l6n$1@dont-email.me> <uebhpo$287vi$1@dont-email.me> <650965c6@news.ausics.net> <uebq0s$29kan$1@dont-email.me>
Injection-Info: chiark.greenend.org.uk; posting-host="chiark.greenend.org.uk:212.13.197.229";
logging-data="7436"; mail-complaints-to="abuse@chiark.greenend.org.uk"
User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (Linux/5.10.0-22-amd64 (x86_64))
Originator: theom@chiark.greenend.org.uk ([212.13.197.229])
 by: Theo - Tue, 19 Sep 2023 20:55 UTC

The Natural Philosopher <tnp@invalid.invalid> wrote:
> /sys, /proc, /run would seem to be created by the machine at boot time,
> and shouldn't be created as subdirs of the root partition...or should
> the directories be created, but empty?

/sys, /proc and /dev are filesystems which are mounted at boot time. You
need the empty directories to act as mount points, because Unix mounts
filesystems on top of a directory that already exists, switching out
whatever is there.

It seems that some distros have /var/run and point a symlink from /run to
it, so it doesn't need a mount point created for them. They then mount a
tmpfs at /var/run (so /var/run is an empty directory that needs to exist to
be mounted on top of)

> So putatively one might back up everything in / except /run, /proc &
> /sys, including /boot, plonk a shiny new SD card in a host computer,
> create a VFAT partition of say 256MB, and the rest as ext4, untar the
> archive into the ext4 partition and move the entire contents of /boot
> onto the VFAT, shove the card in a pi , apply power, and Robert should
> be a relative?

I think that will probably work.

> The vfat partition will get mounted on the (now empty) /boot mount
> point, and everything else will be where it ought to be, and /run /sys
> and /proc will get generated by the boot process?

One thing to watch that distros' /etc/fstab often mounts partitions based
on a UUID. So /boot on one SD will have a different UUID to another, and
the mount of /boot will fail. It'll still find the kernel from /boot, but
any time later anything wants to load something from /boot it may fail
because the mount failed. You could change the device name in /etc/fstab to
be /dev/mmcblk0p1 or similar to be sure it's the same every time.
(the Pi has a single SD slot so no chance of mixing it up with another)

'blkid' will show your partition devices with their UUIDs.

> What about /dev? Is that dynamically created or not?

A dynamic filesystem mounted to a static pre-existing mount point.

Theo

Re: backing up a PI SD card..

<650a1e5f@news.ausics.net>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7331&group=comp.sys.raspberry-pi#7331

 copy link   Newsgroups: comp.sys.raspberry-pi
Message-ID: <650a1e5f@news.ausics.net>
From: not...@telling.you.invalid (Computer Nerd Kev)
Subject: Re: backing up a PI SD card..
Newsgroups: comp.sys.raspberry-pi
References: <ue6gb9$ad15$3@dont-email.me> <ue7mvp$h5ck$1@dont-email.me> <ue97ia$1n8d4$2@dont-email.me> <ue9hro$1p8t7$1@dont-email.me> <ue9jji$1pgu7$3@dont-email.me> <ueb0a6$25l6n$1@dont-email.me> <uebhpo$287vi$1@dont-email.me> <650965c6@news.ausics.net> <uebq0s$29kan$1@dont-email.me>
User-Agent: tin/2.0.1-20111224 ("Achenvoir") (UNIX) (Linux/2.4.31 (i586))
NNTP-Posting-Host: news.ausics.net
Date: 20 Sep 2023 08:19:12 +1000
Organization: Ausics - https://ausics.net
Lines: 52
X-Complaints: abuse@ausics.net
Path: i2pn2.org!i2pn.org!news.bbs.nz!news.ausics.net!not-for-mail
 by: Computer Nerd Kev - Tue, 19 Sep 2023 22:19 UTC

The Natural Philosopher <tnp@invalid.invalid> wrote:
> On 19/09/2023 10:11, Computer Nerd Kev wrote:
>> The Natural Philosopher <tnp@invalid.invalid> wrote:
>> The Pi doesn't need anything like a boot sector. The firmware is
>> smart enough to find the boot files on the filesystem, provided
>> it's FAT32.
>
> I suppose that needs to be the first partition?

"It is no longer necessary for the first partition to be the FAT
partition, as the MSD boot will continue to search for a FAT
partition beyond the first one."
https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#boot-sequence

> The other question why always gets me on backups is how many of the
> directories in the root partition can safely be ignored?
>
> /sys, /proc, /run would seem to be created by the machine at boot time,
> and shouldn't be created as subdirs of the root partition...or should
> the directories be created, but empty?

/sys and /proc can be created empty, because they're mountpoints.
However I don't bother excluding them from backups personally.

> So putatively one might back up everything in / except /run, /proc &
> /sys, including /boot, plonk a shiny new SD card in a host computer,
> create a VFAT partition of say 256MB, and the rest as ext4, untar the
> archive into the ext4 partition and move the entire contents of /boot
> onto the VFAT, shove the card in a pi , apply power, and Robert should
> be a relative?
>
> The vfat partition will get mounted on the (now empty) /boot mount
> point, and everything else will be where it ought to be, and /run /sys
> and /proc will get generated by the boot process?

Yes. Mounting the FAT32 partition at /boot is specific behaviour
for RPi OS / Debian. Linux itself doesn't care if that partition
gets mounted at all - by the time the kernel is loaded its job has
been done, but Debian probably expects it there for configuration
and upgrades.

> What about /dev? Is that dynamically created or not?

The device files need backing up, or else something might have to
create them with mknod. It contains more mountpoints though, so
you can look at the list displayed by "mount" and exclude those
sub-directories of /dev if you like. Again, I don't bother to do
that.

--
__ __
#_ < |\| |< _#

Re: backing up a PI SD card..

<uedp9m$2omcs$4@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7332&group=comp.sys.raspberry-pi#7332

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp...@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: backing up a PI SD card..
Date: Wed, 20 Sep 2023 04:35:18 +0100
Organization: A little, after lunch
Lines: 74
Message-ID: <uedp9m$2omcs$4@dont-email.me>
References: <ue6gb9$ad15$3@dont-email.me> <ue7mvp$h5ck$1@dont-email.me>
<ue97ia$1n8d4$2@dont-email.me> <ue9hro$1p8t7$1@dont-email.me>
<ue9jji$1pgu7$3@dont-email.me> <ueb0a6$25l6n$1@dont-email.me>
<uebhpo$287vi$1@dont-email.me> <uecrd4$2fib4$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 20 Sep 2023 03:35:18 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="054f6db54423c821ae90fded8316334d";
logging-data="2906524"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+XkDoIwtsz7CoNGrY85rmV79WDrCK8Moo="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:jmzGKNjGVJGGSbjHUE5WbXnRvk0=
Content-Language: en-GB
In-Reply-To: <uecrd4$2fib4$1@dont-email.me>
 by: The Natural Philosop - Wed, 20 Sep 2023 03:35 UTC

On 19/09/2023 20:05, Martin Gregorie wrote:
> On Tue, 19 Sep 2023 08:15:03 +0100, The Natural Philosopher wrote:
>
>> On 19/09/2023 03:15, Newyana2 wrote:
>>> "The Natural Philosopher" <tnp@invalid.invalid> wrote
>>>
>>> | > |
>>> | > Start menu. The raspberry icon in lower left. |
>>> | ??? Icon? On a headless Pi Zero?
>>> |
>>> Ah. You might have said that in the first place. It
>>> doesn't make much sense to ask for help and then be difficult with
>>> people who try to help. I gather you only posted to argue.
>>>
>>>
>> No. I am trying to establish whether one can, in essence, make a
>> bootable PI SD card by taking a raw card, creating the two partitions on
>> it and loading it up with files, or whether there is the equivalent of a
>> boot sector which would mandate the use of e.g. dd to create it
>>
>> Naturally all the documentation assumes a windows numpty and shows you
>> how to stamp the SD card with an image.
>>
>> You assumed I wanted to clone the card. I don't. I want to back one up
>> without using DD because, as the concurrent thread has identified, the
>> PI expands the file system to the whole card and that makes for a big
>> image.
>> I'd rather back it up as files if possible.
>>
>> If at some future date I need to recreate it, instead of dd-ing the
>> image, I would prefer to create the two partitions and populate them
>> from the tarball.
>
> Take a look at 'rsync' - its my go-to tool for backing up complete Linux
> filing systems, specific partitions or lists of files and partitions to as
> a named directory structure on a backup disk.
>
Been using it for years to do nightly backups of all my data.

> It is designed make the backup directory structure identical to the
> current list of files and directories you ask it to back up, IOW, if you
> rerun the sa,me command a week later it will remove any files and
> directories from the previous backup session, replace any files and
> directories that have been changed and add any new files and directories.
>
> Consequently, subsequent runs will usually be much faster than the initial
> backup.
>
They are. When I replaced my backup drive because it went faulty the
machine ran all night filling it up :-)

Mostly its about a 3 minute run.

However this isn't about backup, so much as recovering from an SD card
failure.

No data on this machine ever changes - unless its reprogrammed at a user
level, and that is easy to replicate in half an hour

I probably wouldn't ever bother to update or upgrade its operating
system either.
It will sit there, 'bits in silicon' , just doing the one thing it was
designed to do until I move into a gaga home because I cant remember who
I am :-)

--
If I had all the money I've spent on drink...
...I'd spend it on drink.

Sir Henry (at Rawlinson's End)

Re: backing up a PI SD card..

<uedpd4$2omcs$5@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7333&group=comp.sys.raspberry-pi#7333

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp...@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: backing up a PI SD card..
Date: Wed, 20 Sep 2023 04:37:08 +0100
Organization: A little, after lunch
Lines: 55
Message-ID: <uedpd4$2omcs$5@dont-email.me>
References: <ue6gb9$ad15$3@dont-email.me> <ue7mvp$h5ck$1@dont-email.me>
<ue97ia$1n8d4$2@dont-email.me> <ue9hro$1p8t7$1@dont-email.me>
<ue9jji$1pgu7$3@dont-email.me> <ueb0a6$25l6n$1@dont-email.me>
<uebhpo$287vi$1@dont-email.me> <650965c6@news.ausics.net>
<uebq0s$29kan$1@dont-email.me> <uecrti$2fib4$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 20 Sep 2023 03:37:08 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="054f6db54423c821ae90fded8316334d";
logging-data="2906524"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/W1ojY8VFr4jkLKt6+HXYxNIrUvD9IACM="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:eQD8aDY3rwrlUizbD/8tsNLUMM8=
Content-Language: en-GB
In-Reply-To: <uecrti$2fib4$2@dont-email.me>
 by: The Natural Philosop - Wed, 20 Sep 2023 03:37 UTC

On 19/09/2023 20:13, Martin Gregorie wrote:
> On Tue, 19 Sep 2023 10:35:23 +0100, The Natural Philosopher wrote:
>
>> On 19/09/2023 10:11, Computer Nerd Kev wrote:
>>> The Natural Philosopher <tnp@invalid.invalid> wrote:
>>>> No. I am trying to establish whether one can, in essence, make a
>>>> bootable PI SD card by taking a raw card, creating the two partitions
>>>> on it and loading it up with files,
>>>
>>> Yes. In fact if you set the OS up from scratch you don't even need two
>>> partitions, just one FAT32 parition with the boot files required by the
>>> Pi.
>>>
>>> I set up a Linux system to boot off the FAT32 parition then run in a
>>> tmpfs. So instead of an image file there's just a ZIP archive which
>>> needs to be unpacked to the root of a FAT32-formatted SD card. No image
>>> writer tool required, and no worries about partition sizes.
>>>
>>> The Pi doesn't need anything like a boot sector. The firmware is smart
>>> enough to find the boot files on the filesystem, provided it's FAT32.
>>>
>>>
>> I suppose that needs to be the first partition?
>>
> Nope: just whatever partition the RPi installer configured to be the boot
> partition.

I think we are not on the same hymn sheet.. The point is to NOT use a
'pi installer'

>
>> So putatively one might back up everything in / except /run, /proc &
>> /sys, including /boot, plonk a shiny new SD card in a host computer,
>> create a VFAT partition of say 256MB, and the rest as ext4, untar the
>> archive into the ext4 partition and move the entire contents of /boot
>> onto the VFAT, shove the card in a pi , apply power, and Robert should
>> be a relative?
>>
> Just tell dd to copy everything from the source SD card to the new one. If
> the latter card is bigger,use parted to extend the new ext4 partition and
> to format the new sectors.

That is precisely what I do not want to do, and what this thread is all
about, because DD is simply too blunt an instrument.

>>
>
>

--
"And if the blind lead the blind, both shall fall into the ditch".

Gospel of St. Mathew 15:14

Re: backing up a PI SD card..

<uedphs$2omcs$6@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7334&group=comp.sys.raspberry-pi#7334

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp...@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: backing up a PI SD card..
Date: Wed, 20 Sep 2023 04:39:40 +0100
Organization: A little, after lunch
Lines: 65
Message-ID: <uedphs$2omcs$6@dont-email.me>
References: <ue6gb9$ad15$3@dont-email.me> <ue7mvp$h5ck$1@dont-email.me>
<ue97ia$1n8d4$2@dont-email.me> <ue9hro$1p8t7$1@dont-email.me>
<ue9jji$1pgu7$3@dont-email.me> <ueb0a6$25l6n$1@dont-email.me>
<uebhpo$287vi$1@dont-email.me> <uecrd4$2fib4$1@dont-email.me>
<ued0r2$2gotm$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 20 Sep 2023 03:39:40 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="054f6db54423c821ae90fded8316334d";
logging-data="2906524"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1976McVu0vxnyfe1fmNW4NQFYUUOc1NT/Y="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:TyDrGnopSicMHOQaYIhFcli/2Bw=
Content-Language: en-GB
In-Reply-To: <ued0r2$2gotm$1@dont-email.me>
 by: The Natural Philosop - Wed, 20 Sep 2023 03:39 UTC

On 19/09/2023 21:37, druck wrote:
> On 19/09/2023 20:05, Martin Gregorie wrote:
>> On Tue, 19 Sep 2023 08:15:03 +0100, The Natural Philosopher wrote:
>>> No.  I am trying to establish whether one can, in essence, make a
>>> bootable PI SD card by taking a raw card, creating the two partitions on
>>> it and loading it up with files, or whether there is the equivalent of a
>>> boot sector which would mandate the use of e.g. dd to create it
>
>> Take a look at 'rsync' - its my go-to tool for backing up complete Linux
>> filing systems, specific partitions or lists of files and partitions
>> to as
>> a named directory structure on a backup disk.
>>
>> It is designed make the backup directory structure identical to the
>> current list of files and directories you ask it to back up, IOW, if you
>> rerun the sa,me command a week later it will remove any files and
>> directories from the previous backup session, replace any files and
>> directories that have been changed and add any new files and directories.
>>
>> Consequently, subsequent runs will usually be much faster than the
>> initial
>> backup.
>
> Here's the rsync options I used to backup the partitions, firstly the
> FAT partition which accounts for the lower resolution of timestamps
>
> rsync -vax --stats --modify-window=2 --delete /boot/ <boot_backup_dir>
>
> And the main partition with the exclusions to prevent pseudo filing
> systems and temporary stuff being included when backing up live systems,
> some of it shouldn't be necessary but turns out is needed
>
> rsync -vaxHAX --stats --numeric-ids --delete --delete-excluded
> --exclude=/tmp/*
> --exclude=/run/*
> --include=/var/lock
> --exclude=/var/run
> --exclude=/var/swap
> --exclude=/var/cache/*
> --exclude=/var/tmp/*
> --exclude=/var/lib/machines/*/var/cache/
> --exclude=/var/lib/mlocate/*
> --exclude=/var/lib/nginx/fastcgi/*
> --exclude=/var/log/journal/*
> --exclude=/var/log/Xorg.*
> --exclude=/lost+found/*
> --exclude=*/.cache
> --exclude=*/__pycache__
> --exclude=*/chromium/hyphen-data/
> --exclude=*/.config/chromium/*Cache*/*
> / <root_backup_dir>
>
> ---druck

Looks very like what my *86 big main server has..but that is a handy
crib and thank you very much for it.

I'll have to look at comms between my main backup machine and the pi,
but that may after all be the simplest solution

--
To ban Christmas, simply give turkeys the vote.

Re: backing up a PI SD card..

<uedq2r$2omcs$7@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7335&group=comp.sys.raspberry-pi#7335

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp...@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: backing up a PI SD card..
Date: Wed, 20 Sep 2023 04:48:42 +0100
Organization: A little, after lunch
Lines: 78
Message-ID: <uedq2r$2omcs$7@dont-email.me>
References: <ue6gb9$ad15$3@dont-email.me> <ue7mvp$h5ck$1@dont-email.me>
<ue97ia$1n8d4$2@dont-email.me> <ue9hro$1p8t7$1@dont-email.me>
<ue9jji$1pgu7$3@dont-email.me> <ueb0a6$25l6n$1@dont-email.me>
<uebhpo$287vi$1@dont-email.me> <650965c6@news.ausics.net>
<uebq0s$29kan$1@dont-email.me> <mWk*VkOqz@news.chiark.greenend.org.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 20 Sep 2023 03:48:43 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="054f6db54423c821ae90fded8316334d";
logging-data="2906524"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19ahWYgejr6G5Wijvsqv6ucpF68EW5H1oc="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:yatT2cSsVPmig+4Ag8PrP+NZaE8=
Content-Language: en-GB
In-Reply-To: <mWk*VkOqz@news.chiark.greenend.org.uk>
 by: The Natural Philosop - Wed, 20 Sep 2023 03:48 UTC

On 19/09/2023 21:55, Theo wrote:
> The Natural Philosopher <tnp@invalid.invalid> wrote:
>> /sys, /proc, /run would seem to be created by the machine at boot time,
>> and shouldn't be created as subdirs of the root partition...or should
>> the directories be created, but empty?
>
> /sys, /proc and /dev are filesystems which are mounted at boot time. You
> need the empty directories to act as mount points, because Unix mounts
> filesystems on top of a directory that already exists, switching out
> whatever is there.
>
> It seems that some distros have /var/run and point a symlink from /run to
> it, so it doesn't need a mount point created for them. They then mount a
> tmpfs at /var/run (so /var/run is an empty directory that needs to exist to
> be mounted on top of)
>
>> So putatively one might back up everything in / except /run, /proc &
>> /sys, including /boot, plonk a shiny new SD card in a host computer,
>> create a VFAT partition of say 256MB, and the rest as ext4, untar the
>> archive into the ext4 partition and move the entire contents of /boot
>> onto the VFAT, shove the card in a pi , apply power, and Robert should
>> be a relative?
>
> I think that will probably work.
>
Good...Well at least we dont have to flirt with 'secure boot' and all
the other trash that comes with a *86 board.
Nice old school 'put this here, and the boot loader will find it and
boot it'

>> The vfat partition will get mounted on the (now empty) /boot mount
>> point, and everything else will be where it ought to be, and /run /sys
>> and /proc will get generated by the boot process?
>
> One thing to watch that distros' /etc/fstab often mounts partitions based
> on a UUID. So /boot on one SD will have a different UUID to another, and
> the mount of /boot will fail. It'll still find the kernel from /boot, but
> any time later anything wants to load something from /boot it may fail
> because the mount failed. You could change the device name in /etc/fstab to
> be /dev/mmcblk0p1 or similar to be sure it's the same every time.
> (the Pi has a single SD slot so no chance of mixing it up with another)
>
I knew i had forgotten something..

from the pis /etc/fstab

proc /proc proc defaults 0 0
PARTUUID=b8c9fbb7-01 /boot vfat defaults 0 2
PARTUUID=b8c9fbb7-02 / ext4 defaults,noatime 0 1

> 'blkid' will show your partition devices with their UUIDs.
>
Yeah. Easy enough to either label a new card with the old ids or modify
fstab.

BTDTGTTS

>> What about /dev? Is that dynamically created or not?
>
> A dynamic filesystem mounted to a static pre-existing mount point.
>
OK, thanks

Only question left unanswered is whether there is anything else on the
SD cardstructure to identify which partition is the boot one?

Does the boot loader simply look for the only (first?) VFAT partition?

> Theo

--
“Some people like to travel by train because it combines the slowness of
a car with the cramped public exposure of 
an airplane.”

Dennis Miller

Re: backing up a PI SD card..

<uedqab$2omcs$8@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7336&group=comp.sys.raspberry-pi#7336

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp...@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: backing up a PI SD card..
Date: Wed, 20 Sep 2023 04:52:43 +0100
Organization: A little, after lunch
Lines: 69
Message-ID: <uedqab$2omcs$8@dont-email.me>
References: <ue6gb9$ad15$3@dont-email.me> <ue7mvp$h5ck$1@dont-email.me>
<ue97ia$1n8d4$2@dont-email.me> <ue9hro$1p8t7$1@dont-email.me>
<ue9jji$1pgu7$3@dont-email.me> <ueb0a6$25l6n$1@dont-email.me>
<uebhpo$287vi$1@dont-email.me> <650965c6@news.ausics.net>
<uebq0s$29kan$1@dont-email.me> <650a1e5f@news.ausics.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 20 Sep 2023 03:52:44 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="054f6db54423c821ae90fded8316334d";
logging-data="2906524"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Vw26Zu9SyfWW1r5JMZU+1XJlQa7m/zu0="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:g3ARqDrX9IqPecajkP/bdzB4LCQ=
Content-Language: en-GB
In-Reply-To: <650a1e5f@news.ausics.net>
 by: The Natural Philosop - Wed, 20 Sep 2023 03:52 UTC

On 19/09/2023 23:19, Computer Nerd Kev wrote:
> The Natural Philosopher <tnp@invalid.invalid> wrote:
>> On 19/09/2023 10:11, Computer Nerd Kev wrote:
>>> The Natural Philosopher <tnp@invalid.invalid> wrote:
>>> The Pi doesn't need anything like a boot sector. The firmware is
>>> smart enough to find the boot files on the filesystem, provided
>>> it's FAT32.
>>
>> I suppose that needs to be the first partition?
>
> "It is no longer necessary for the first partition to be the FAT
> partition, as the MSD boot will continue to search for a FAT
> partition beyond the first one."
> https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#boot-sequence
>
Ah. The Final Question is answered.

Thanks m8

>> The other question why always gets me on backups is how many of the
>> directories in the root partition can safely be ignored?
>>
>> /sys, /proc, /run would seem to be created by the machine at boot time,
>> and shouldn't be created as subdirs of the root partition...or should
>> the directories be created, but empty?
>
> /sys and /proc can be created empty, because they're mountpoints.
> However I don't bother excluding them from backups personally.
>
>> So putatively one might back up everything in / except /run, /proc &
>> /sys, including /boot, plonk a shiny new SD card in a host computer,
>> create a VFAT partition of say 256MB, and the rest as ext4, untar the
>> archive into the ext4 partition and move the entire contents of /boot
>> onto the VFAT, shove the card in a pi , apply power, and Robert should
>> be a relative?
>>
>> The vfat partition will get mounted on the (now empty) /boot mount
>> point, and everything else will be where it ought to be, and /run /sys
>> and /proc will get generated by the boot process?
>
> Yes. Mounting the FAT32 partition at /boot is specific behaviour
> for RPi OS / Debian. Linux itself doesn't care if that partition
> gets mounted at all - by the time the kernel is loaded its job has
> been done, but Debian probably expects it there for configuration
> and upgrades.
>
>> What about /dev? Is that dynamically created or not?
>
> The device files need backing up, or else something might have to
> create them with mknod. It contains more mountpoints though, so
> you can look at the list displayed by "mount" and exclude those
> sub-directories of /dev if you like. Again, I don't bother to do
> that.
>
One presumes that if anything else is recreated in /dev at boot, it will
wipe out or be mounted over what was 'backed up'.

Well the strategy seems clear: At some point I will set up a 'preserve
this SD card' methodology, buy a new SD card and see if I can make it work.

--
“A leader is best When people barely know he exists. Of a good leader,
who talks little,When his work is done, his aim fulfilled,They will say,
“We did this ourselves.”

― Lao Tzu, Tao Te Ching

Re: backing up a PI SD card..

<kmvm8hFpuaoU1@mid.individual.net>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7337&group=comp.sys.raspberry-pi#7337

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: nospam...@hermann-riemann.de (Hermann Riemann)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: backing up a PI SD card..
Date: Wed, 20 Sep 2023 09:45:21 +0200
Lines: 15
Message-ID: <kmvm8hFpuaoU1@mid.individual.net>
References: <ue6gb9$ad15$3@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net jYXzvvScr2fTm1S4N7VJlQrmdghUkoBZ36HBo+n0+xeNfVqtcM
Cancel-Lock: sha1:hwtmvaE70ZPjQECQfiHRjfnwC6U= sha256:tGTQlSuhbicZC5+I/WR0YgwvzxFbOo9fBRXL+fBR5/M=
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Content-Language: de-DE
In-Reply-To: <ue6gb9$ad15$3@dont-email.me>
 by: Hermann Riemann - Wed, 20 Sep 2023 07:45 UTC

Am 17.09.23 um 11:19 schrieb The Natural Philosopher:
>
> It occurs to me that essentially a copy of the contents of the two PI
> partitions would be enough, together with an install of Raspios,
> followed by a copy back to the fresh SD, to clone a setup.
>
> It seems too easy. What am I missing?
>

Using an other Linux computer
( raspberry pi 400 or PC ),
take an 5 TB hard disk,
an use dd in order to copy the SD card.
This may be enough for 300 different copy 16 GB SD card.

Re: backing up a PI SD card..

<sUFOM.100368$%uv8.25423@fx15.iad>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7352&group=comp.sys.raspberry-pi#7352

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx15.iad.POSTED!not-for-mail
Newsgroups: comp.sys.raspberry-pi
From: cgi...@kltpzyxm.invalid (Charlie Gibbs)
Subject: Re: backing up a PI SD card..
References: <ue6gb9$ad15$3@dont-email.me> <ue7mvp$h5ck$1@dont-email.me>
<ue97ia$1n8d4$2@dont-email.me> <ue9hro$1p8t7$1@dont-email.me>
<ue9jji$1pgu7$3@dont-email.me> <ueb0a6$25l6n$1@dont-email.me>
User-Agent: slrn/1.0.3 (Linux)
Lines: 22
Message-ID: <sUFOM.100368$%uv8.25423@fx15.iad>
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Wed, 20 Sep 2023 17:23:36 UTC
Date: Wed, 20 Sep 2023 17:23:36 GMT
X-Received-Bytes: 1441
 by: Charlie Gibbs - Wed, 20 Sep 2023 17:23 UTC

On 2023-09-19, Newyana2 <Newyana2@invalid.nospam> wrote:

> "The Natural Philosopher" <tnp@invalid.invalid> wrote
>
>>> Start menu. The raspberry icon in lower left.
>>
>> ??? Icon? On a headless Pi Zero?
>
> Ah. You might have said that in the first place.
> It doesn't make much sense to ask for help and then
> be difficult with people who try to help. I gather
> you only posted to argue.

This is totally off topic, but I'm curious: did you
once post under the name "Mayayana"? If so, I'd like
to thank you for the quote in my .sig below.

--
/~\ Charlie Gibbs | They don't understand Microsoft
\ / <cgibbs@kltpzyxm.invalid> | has stolen their car and parked
X I'm really at ac.dekanfrus | a taxi in their driveway.
/ \ if you read it the right way. | -- Mayayana

Re: backing up a PI SD card..

<uegrtb$3ddtf$3@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7359&group=comp.sys.raspberry-pi#7359

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp...@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: backing up a PI SD card..
Date: Thu, 21 Sep 2023 08:38:19 +0100
Organization: A little, after lunch
Lines: 29
Message-ID: <uegrtb$3ddtf$3@dont-email.me>
References: <ue6gb9$ad15$3@dont-email.me> <ue7mvp$h5ck$1@dont-email.me>
<ue97ia$1n8d4$2@dont-email.me> <ue9hro$1p8t7$1@dont-email.me>
<ue9jji$1pgu7$3@dont-email.me> <ueb0a6$25l6n$1@dont-email.me>
<sUFOM.100368$%uv8.25423@fx15.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 21 Sep 2023 07:38:20 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="68f31c880b0b9e62fc4ab169d2554c95";
logging-data="3585967"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18hUVHOuAzRUGRD7y0xLUDl/I9NiPYFB3A="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:Vb5KAGdc7upUUOzc4teWFE7B3uA=
In-Reply-To: <sUFOM.100368$%uv8.25423@fx15.iad>
Content-Language: en-GB
 by: The Natural Philosop - Thu, 21 Sep 2023 07:38 UTC

On 20/09/2023 18:23, Charlie Gibbs wrote:
> On 2023-09-19, Newyana2 <Newyana2@invalid.nospam> wrote:
>
>> "The Natural Philosopher" <tnp@invalid.invalid> wrote
>>
>>>> Start menu. The raspberry icon in lower left.
>>>
>>> ??? Icon? On a headless Pi Zero?
>>
>> Ah. You might have said that in the first place.
>> It doesn't make much sense to ask for help and then
>> be difficult with people who try to help. I gather
>> you only posted to argue.
>
> This is totally off topic, but I'm curious: did you
> once post under the name "Mayayana"? If so, I'd like
> to thank you for the quote in my .sig below.
>

Er no. I don't believe I ever did. Ive been using this one a LONG time
now as my 'I'm not at work presenting my company' one for a long time.

--
"Women actually are capable of being far more than the feminists will
let them."

Re: backing up a PI SD card..

<sm0fs37e3qq.fsf@lakka.kapsi.fi>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7364&group=comp.sys.raspberry-pi#7364

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anssi.sa...@usenet.mail.kapsi.fi (Anssi Saari)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: backing up a PI SD card..
Date: Thu, 21 Sep 2023 22:16:29 +0300
Organization: An impatient and LOUD arachnid
Lines: 7
Message-ID: <sm0fs37e3qq.fsf@lakka.kapsi.fi>
References: <ue6gb9$ad15$3@dont-email.me> <ue7mvp$h5ck$1@dont-email.me>
<ue97ia$1n8d4$2@dont-email.me> <ue9hro$1p8t7$1@dont-email.me>
<ue9jji$1pgu7$3@dont-email.me> <ueb0a6$25l6n$1@dont-email.me>
<uebhpo$287vi$1@dont-email.me> <650965c6@news.ausics.net>
<uebq0s$29kan$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="5fca63a98e0d5c91beda261e41d6d32f";
logging-data="3856055"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/ZJthswb4JGVabInvWu4DL"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:DrWY86jV2NQ84cveTMCwkS34Kd4=
sha1:xwkZDpfreOIJptHDCSNfFCe6N1E=
 by: Anssi Saari - Thu, 21 Sep 2023 19:16 UTC

The Natural Philosopher <tnp@invalid.invalid> writes:

> The other question why always gets me on backups is how many of the
> directories in the root partition can safely be ignored?

If you don't want to fiddle with that, there is partclone which makes
copies of partitions, smartly enough so it doesn't copy unused sectors.

Re: backing up a PI SD card..

<slrnugpbip.kom.jj@iridium.wf32df>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7365&group=comp.sys.raspberry-pi#7365

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jj...@franjam.org.uk (Jim Jackson)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: backing up a PI SD card..
Date: Thu, 21 Sep 2023 20:58:01 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <slrnugpbip.kom.jj@iridium.wf32df>
References: <ue6gb9$ad15$3@dont-email.me> <ue7mvp$h5ck$1@dont-email.me>
<ue97ia$1n8d4$2@dont-email.me> <ue9hro$1p8t7$1@dont-email.me>
<ue9jji$1pgu7$3@dont-email.me> <ueb0a6$25l6n$1@dont-email.me>
<uebhpo$287vi$1@dont-email.me> <uecrd4$2fib4$1@dont-email.me>
<ued0r2$2gotm$1@dont-email.me>
Injection-Date: Thu, 21 Sep 2023 20:58:01 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="24fe10335dbf023a61edbe0032445c15";
logging-data="3887508"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+qSLmqtRJZdltISjy+h+3QpCX4gvOAXAw="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:egzwZIcMyX1qQmbFZeMetYsfDOw=
 by: Jim Jackson - Thu, 21 Sep 2023 20:58 UTC

On 2023-09-19, druck <news@druck.org.uk> wrote:
>
> Here's the rsync options I used to backup the partitions, firstly the
> FAT partition which accounts for the lower resolution of timestamps
>
> rsync -vax --stats --modify-window=2 --delete /boot/ <boot_backup_dir>
>
> And the main partition with the exclusions to prevent pseudo filing
> systems and temporary stuff being included when backing up live systems,
> some of it shouldn't be necessary but turns out is needed
>
> rsync -vaxHAX --stats --numeric-ids --delete --delete-excluded
> --exclude=/tmp/*
> --exclude=/run/*
> --include=/var/lock
> --exclude=/var/run
> --exclude=/var/swap
> --exclude=/var/cache/*
> --exclude=/var/tmp/*
> --exclude=/var/lib/machines/*/var/cache/
> --exclude=/var/lib/mlocate/*
> --exclude=/var/lib/nginx/fastcgi/*
> --exclude=/var/log/journal/*
> --exclude=/var/log/Xorg.*
> --exclude=/lost+found/*
> --exclude=*/.cache
> --exclude=*/__pycache__
> --exclude=*/chromium/hyphen-data/
> --exclude=*/.config/chromium/*Cache*/*
> / <root_backup_dir>
>

I use very similar options. I add -u and I add the --delete-after
option. Oh and --numeric-ids . I've been bitten by backing up to a
system where some of the system uids (<1000) were different and on backup
got mangled. At least with numeric-only they go back as they were.

Re: backing up a PI SD card..

<uejjur$3j1j$2@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=7367&group=comp.sys.raspberry-pi#7367

 copy link   Newsgroups: comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp...@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.sys.raspberry-pi
Subject: Re: backing up a PI SD card..
Date: Fri, 22 Sep 2023 09:40:59 +0100
Organization: A little, after lunch
Lines: 80
Message-ID: <uejjur$3j1j$2@dont-email.me>
References: <ue6gb9$ad15$3@dont-email.me> <ue7mvp$h5ck$1@dont-email.me>
<ue97ia$1n8d4$2@dont-email.me> <ue9hro$1p8t7$1@dont-email.me>
<ue9jji$1pgu7$3@dont-email.me> <ueb0a6$25l6n$1@dont-email.me>
<uebhpo$287vi$1@dont-email.me> <uecrd4$2fib4$1@dont-email.me>
<ued0r2$2gotm$1@dont-email.me> <slrnugpbip.kom.jj@iridium.wf32df>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 22 Sep 2023 08:40:59 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="014d89f4b11302b9983a92f4eafa2eb7";
logging-data="117811"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+bk1owLo0PyJov8Xus2yw13KrgeDmUeJI="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:QOq+d/nC5cR39ET0JSXl11H9ksE=
In-Reply-To: <slrnugpbip.kom.jj@iridium.wf32df>
Content-Language: en-GB
 by: The Natural Philosop - Fri, 22 Sep 2023 08:40 UTC

On 21/09/2023 21:58, Jim Jackson wrote:
> On 2023-09-19, druck <news@druck.org.uk> wrote:
>>
>> Here's the rsync options I used to backup the partitions, firstly the
>> FAT partition which accounts for the lower resolution of timestamps
>>
>> rsync -vax --stats --modify-window=2 --delete /boot/ <boot_backup_dir>
>>
>> And the main partition with the exclusions to prevent pseudo filing
>> systems and temporary stuff being included when backing up live systems,
>> some of it shouldn't be necessary but turns out is needed
>>
>> rsync -vaxHAX --stats --numeric-ids --delete --delete-excluded
>> --exclude=/tmp/*
>> --exclude=/run/*
>> --include=/var/lock
>> --exclude=/var/run
>> --exclude=/var/swap
>> --exclude=/var/cache/*
>> --exclude=/var/tmp/*
>> --exclude=/var/lib/machines/*/var/cache/
>> --exclude=/var/lib/mlocate/*
>> --exclude=/var/lib/nginx/fastcgi/*
>> --exclude=/var/log/journal/*
>> --exclude=/var/log/Xorg.*
>> --exclude=/lost+found/*
>> --exclude=*/.cache
>> --exclude=*/__pycache__
>> --exclude=*/chromium/hyphen-data/
>> --exclude=*/.config/chromium/*Cache*/*
>> / <root_backup_dir>
>>
>
> I use very similar options. I add -u and I add the --delete-after
> option. Oh and --numeric-ids . I've been bitten by backing up to a
> system where some of the system uids (<1000) were different and on backup
> got mangled. At least with numeric-only they go back as they were.
>

This is what I ended up using. I have to back up /boot every time as it
gets deleted by the first backup

#!/bin/bash
# Mounts the backup server, backs up the files in / excluding mounted
stuff and other dross
# then backs up the boot partition
# and unmounts the backup server

mount 192.168.0.100:/backup2 /mnt
cd /mnt/heating-controller

# And the main partition with the exclusions to prevent pseudo filing
systems and temporary stuff being included when backing up live systems,
some of it shouldn't be necessary # but turns out is needed

rsync -vaxHAX --stats --numeric-ids --delete --delete-excluded
--one-file-system --exclude=/tmp/* --exclude=/run/* --include=/var/lock
--exclude=/var/run --exclude=/var/swap --exclude=/var/cache/*
--exclude=/var/tmp/* --exclude=/var/lib/machines/*/var/cache/
--exclude=/var/lib/mlocate/* --exclude=/var/lib/nginx/fastcgi/*
--exclude=/var/log/journal/* --exclude=/var/log/Xorg.*
--exclude=/lost+found/* --exclude=*/.cache --exclude=*/__pycache__
--exclude=*/chromium/hyphen-data/ --exclude=*/.config/chromium/*Cache*/* / .

rsync -vax --stats --modify-window=2 --delete /boot/ ./boot
cd
umount /mnt

--
“I know that most men, including those at ease with problems of the
greatest complexity, can seldom accept even the simplest and most
obvious truth if it be such as would oblige them to admit the falsity of
conclusions which they have delighted in explaining to colleagues, which
they have proudly taught to others, and which they have woven, thread by
thread, into the fabric of their lives.”

― Leo Tolstoy

1
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor