I don’t know the specifics for your case until it occurs. First I’ll suggest some information on rsync
topics:
- https://forums.developer.nvidia.com/t/topic/285222/17
- https://forums.developer.nvidia.com/t/topic/274197/23
- https://forums.developer.nvidia.com/t/topic/276071/2
- https://forums.developer.nvidia.com/t/topic/275386/46
- https://forums.developer.nvidia.com/t/topic/236295/5
I actually have too many posts on the topic to zero in on one. You can skim those though and find which ones offer command examples. Concentrate first on clone or backup. Do realize that some of the articles are for different models of Jetsons.
Always keep in mind these rsync
options:
--dry-run
This allows you to see what a command would do without really doing it. Makes a lot of testing safe.--numeric-ids
This is mandatory for copy of content from one Linux system to another if you want to keep ownership the same. Users and groups are really known by their alias, such as the user name, but the true identifier is the numeric ID. This option allows one to back up and restore the ID, not just an alias.--delete-before
If you don’t have a lot of backup space, or if you don’t care about special failure cases (such as loss of power during the backup), then this can reduce the peak amount of disk space during the actual backup. With this, if a file is modified and going to be copied, then at the destination the old content is erased before copy; without this, the new file is added with a temp name, and then when complete, the original is overwritten.- Many options are just to preserve permissions. There is overlap and it usually doesn’t hurt.
- Jetsons don’t normally use extended security attributes (ACLs, or Access Control Lists from SElinux), but if you do have this, then the
-X
option preserves this. Might not matter if your filesystem is not set up for ACLs. --info=progress2,stats2
This is just to see progress. Backups can take a long time, and it adds anxiety if you don’t know what is going on.- Local or remote accounts over
ssh
are usually interchangeable. If you use-e ssh
, then these examples offer destinations or sources:/home/someone
someone@remotehost.com:/home/someone
- If you set up
ssh
keys, then command linessh
withrsync
is trivial effort. - Sometimes options require root authority, e.g.,
--numeric-ids
at the end which writes a file using a numeric ID. I usually unlock root login overssh
with keys only on Ubuntu since it is much much simpler than playing with the options to do so withsudo
. In this case your root user would have a public/private key pair, and the only login is viasudo
or viassh
using key pairs (password login is still prohibited and keys can be revoked).
Restoring directions depend on how the backup was created. There isn’t one easy answer. If you mean console mode from a normal login, then that is usually trivial since the system is running (anything in boot stages immediately makes the problem much more difficult). If you mean a rescue mode, then this is not easy. An exception might exist if you’ve customized boot to allow a bash
shell with networking and ssh
. Otherwise you’re back to flashing instead of direct restore. When flashing there are a number of ways to use backed up content. This is an entire industry on its own, so you’d have to ask when specifics are known.
I highly recommend using a Jetson you don’t depend on to practice backup and restore. Having actually tested what you know is incredibly useful.