This page continues Moving an Account.
What does not come across#
- Passwords, the SD one and the Linux one.
- The
sd-onswitch. It is not in the manifest, so a restored account has it off, an existing one keeps what it had. (settings.reportdoes not show it either.) - The Linux user's home directory, its ssh keys and its other group memberships.
- The system: SDSYS and its VOC,
sd.conf, the TLS certificate, the ssh and API setup, the audit trail, and every global program that is not tied to an account's object file. - Anything the account only points at. A VOC pointer to a file outside the account is named (outer in jack points outside the account (/etc) and was left unchanged.) and not followed. Indices kept outside the account are not in the zip; the restore says Rebuild them with build.index.
- Accounts outside the accounts folders. An account whose directory is not directly inside
user_accountsorgroup_accountsis refused by the privileged helper, and withallthat stops the whole backup, leaving no zip. Name the other accounts one by one.
backup.account all takes every registered account but SDSYS, so the shared account is in it.
Restoring shared is not covered by anything said here: the restore gives a group account's files
to its register group, sdg_shared, while the installer gives that directory to sdusers
(see The Shared Account), so check the group of its files after a
restore. When you move only some accounts, name them.
The Linux user and groups#
An account that already exists keeps its Linux user, its password and its groups. Only its files, its description and its suspension change.
A user account SD has to create is made the way create.account makes one:
- The Linux user is named after the account.
os.userandos.groupin the manifest are not read. The user is made with its own home directory and the groupsdu_jack, joinssdusers, and joinssdssh,sdapiandsdfileswhere the manifest says 1. Its user number is whatever the machine gives it, and ownership is set by name, so a different number on the old machine does not matter. - SD asks for the password at the terminal and prints the rule (A password needs at least 8
characters, with a lower-case letter, an upper-case letter, a digit and a symbol.). It gives
three attempts at the pair of entries. If Linux or SD refuses the password, SD says why and
asks Warning, user created but password not set, Retry (y/
)? . If you decline, SD removes the Linux user again, says An account must have a password. Nothing was created. and the account is not restored.no.queryremoves the "Restore these accounts" question and not this one. Commands typed after ano.queryrestore are taken as passwords. - A route the machine cannot yet serve is said and not refused: … is set up to sign in over ssh, but this machine has no ssh server yet. The account is still made.
A group account is made with its Linux group sdg_name, owned by sdsys. Its members: are
Linux user names, and each must be a user of the new machine. One that is not is named and the
rest go on: nosuchuser could not be added to group sdg_work (status 2). Add it with
modify.account once it is an SD user.
When the machines differ#
- Different host names.
restore.account latesttakes only a backup whose file name carries this machine's name, the part of the host name before the first dot, in lower case. A zip from another machine gives No backup of jack made on this computer was found in …. Name the file. A renamed file is also never picked bylatest. - A different accounts folder. Values in the account's VOC that begin with the old account's
path are rewritten to the new one: a pointer to
/home/sd/user_accounts/jack/invbecomes the account's path on the new machine. A pointer to somewhere outside the account is listed, not followed (… points outside the account (…) and was left unchanged.). Only the VOC is rewritten: a path written in a record or a program is left as it is. - Indices kept outside the account. A hashed file whose indices were relocated inside the
account is pointed at its new index path. Indices outside the account are not in the archive,
and the restore says so (The indices of … were at …, outside the account, so they are not in
the backup. Rebuild them with build.index.): build them again with
build.index. - The account's Linux user, when the account already exists. An account the new machine
already has keeps its own Linux user, password and groups. One that SD creates is made as
create.accountmakes it, from the manifest's description, routes, members and suspension. - The Linux user name is already taken. SD reuses the user only if SD itself made it (its
comment is exactly
SD account) and keeps its password: jack is a Linux user that SD itself created earlier, so the restored account uses it. Its Linux password is unchanged. The user is taken out of every route group the restored account does not ask for (sdssh,sdapi,sdfiles,sdfileswrite,sdfilesadminandsdaiusers), so a leftover user does not keep the remote routes of the account it belonged to before; a membership SD cannot read or remove stops the restore with Unable to change remote access. It is also restored with key sign-in over ssh off (a backup holds no such setting;modify.accountnamessh-key-onafterwards if it should have it). Any other user is refused, nothing is created, and the account is not restored:
Linux user jack already exists. SD accounts create their own Linux user
jack was not restored.
Rename or remove that Linux user with the operating system's tools, then run the restore again.
There is no way to restore under another account name. A word such as as is read as an
account name: as is not in this backup.
* A Windows backup. The archive format is shared with SD Core for Windows, and the restore
accepts a full backup of it by the same manifest rules as a Linux one (a backup from SD Core Solo for Windows or
SD Core Solo for Linux, or a different format, is refused). It reads the Windows paths in the account's VOC pointers, both
separators and without regard to case, and rewrites those that lead into the account to the
new place. A pointer whose file is not in the backup under that exact spelling is reported
(… points at …, which does not exist here with that exact spelling.), and a pointer that
leads outside the account is left as it was (… points outside the account (…) and was left
unchanged.).
When it refuses#
| It says | Why |
|---|---|
| The archive does not match its manifest: jack (manifest 99/45332/6, unpacked 10/45332/6). Nothing was restored. | the zip was changed or damaged |
| … has manifest format 2, and this version reads format 1. Nothing was restored. | a newer zip format |
| This backup is from linux-solo and this system is linux-full. … | the wrong product |
| nosuch is not in this backup. | the name is not in the manifest |
| Making the archive … failed (status 2): sd-elevate: REFUSED … | an account outside the accounts folders |
| 1 other session(s) are logged in. Every other session must log out first: | log them out and run it again |
| … already exists, left by an earlier restore that did not finish. | remove that .sdrestore.n folder |
None of these changed an account, and the restore leaves no .sdrestore.n folder behind (except
in the last row, where it is the folder that is the cause). The source also refuses a zip with
an entry outside manifest.txt and accounts/, a .. or absolute path, a backslash, or a symbolic
link.
See also#
Backing Up and Restoring Accounts for the verbs and set.backup.directory;
Accounts and Security for the switches;
Data at Rest for backups and encryption.