diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 31f7c4bb..f08e3d3d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -57,6 +57,8 @@ jobs: run: LD_LIBRARY_PATH="$HOME/hostroot/lib" tests/test-net.sh "$HOME/hostroot/bin/uci" - name: Model descriptions (board.sh, LEDs, fan backends) run: tests/test-boards.sh + - name: Disk change wizard (shareos-migrate with two folders as drives) + run: LD_LIBRARY_PATH="$HOME/hostroot/lib" tests/test-migrate.sh "$HOME/hostroot/bin/uci" - name: Rescue mode (SSH only after the USB button) run: tests/test-rescue.sh - name: Size check of the flash partition in shareos-install-ubi diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ea33b07..54f1e63f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ From the first test on a DNR-322L ([#180](https://github.com/UniqueDroid/ShareOS - *Shares* and *Users*: a share named like an account with a personal folder (possible before 0.3.0-beta.14 refused such names) takes the address `\\box\` over SMB, so the personal folder cannot be reached there. Both lists now say so at the share and at the account, with what to do: create the share again under another name. - **Signed app catalog.** The store catalog lists the checksum of every package, so whoever could change it could swap a package. The apps repository now signs `index.json` with its own key, and the box uses the official catalog only with a valid signature (otherwise the store shows the error at the source). Sources you add yourself still work: their apps are marked *not signed by the ShareOS project*, need a confirmation and install as not checked. - *Storage → Drives*: formatting a USB drive could fail right after partitioning ("creating the file system failed") – the new partition can disappear for a moment while the kernel reads the partition table again. It now waits until the partition can be opened and tries once more, as setting up internal drives already did. +- **Disk change** (*Storage → DISK CHANGE*): moves everything from an old drive to a new one – shares, personal folders, the app area and folders that are not shared – and then switches over, so that nothing has to be set up again. The copy runs in the background with progress and *Cancel*; going on copies only the rest. *Switch now* stops shares, apps, downloads and the media server for the last copy and points shares, personal folders, app area, USB copy and snapshot jobs to the new drive. Owners, permissions, ACLs and hard links stay (rsync); snapshots stay on the old drive, which is not changed. The new disk can sit in the second bay or in a USB case and go into a bay afterwards. ## 0.3.0-beta.15 diff --git a/README.md b/README.md index ddd4c31b..6f703d3c 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,7 @@ Version in brackets = first release with the feature. - Share rights are also set as POSIX ACLs on the share folders (ext4, Btrfs), so every program of a user is held to them, not only SMB (0.2.0-beta.6) - **Snapshots:** dated states of shares, personal folders or whole drives on another drive (hourly to weekly, hard links like rsnapshot, keep the last N plus days/weeks/months), restore with the file browser (0.2.0-beta.6) - SMART values and health, disk standby, RAID status with sync progress, repair a mirror with a new disk (beta.9), mount/unmount/remove volumes +- **Disk change:** move everything from an old drive to a new one – shares, personal folders, app area – with progress, cancel and resume, then switch over in one step; the new disk can be in the second bay or a USB case (0.3.0-beta.16) - Disk health page: rating with reasons, SSD life left, all SMART attributes, short/long self-tests by hand or by schedule (0.2.0-beta.12) - **USB sticks and disks:** mounted at `/mnt/usb-` when plugged in (FAT32, exFAT, NTFS, ext4, Btrfs), **Safely remove**, **Format** with exFAT, FAT32, NTFS or ext4 (beta.7) diff --git a/docs/TESTEN.md b/docs/TESTEN.md index f360c6ee..623ab8d0 100644 --- a/docs/TESTEN.md +++ b/docs/TESTEN.md @@ -530,6 +530,16 @@ Braucht ein Tailscale-Konto (kostenlos), ein Handy oder einen Rechner mit Tailsc 5. Konto ohne persönlichen Ordner: Teilen meldet „no personal folder“; das Geteilte wird verworfen und kommt bei der nächsten Anmeldung nicht wieder. 6. Dateidialog einer App für ein Konto **ohne** *Dateien* (z. B. Webpad → *Öffnen*): Die Ordnerauswahl zeigt zuerst *App-Daten*, dann *Mein Ordner* und die Freigaben des Benutzers; Freigaben nur zum Lesen sind markiert und fehlen beim Speichern. Die App legt ihre eigenen Dateien weiter in *App-Daten* ab. +## 14zy. Plattenwechsel (0.3.0-beta.16) + +Braucht eine zweite Platte (Schacht oder USB-Gehäuse), die gelöscht werden darf. **Nicht auf einer Box mit Daten, die du ohne Sicherung nicht verlieren darfst.** + +1. *Storage → Drives*: Die zweite Platte als einzelnes Laufwerk mit ext4 einrichten (z. B. `neu`). *Storage → DISK CHANGE*: altes Laufwerk = das mit deinen Daten, neues Laufwerk = `neu`, *Check*: Freigaben, persönliche Ordner, App-Bereich und die Datenmenge werden aufgelistet. Zweimal dasselbe Laufwerk oder ein Laufwerk mit Daten zeigt den Grund, *Start copying* bleibt aus. +2. *Start copying*: Der Balken läuft; die Freigaben bleiben benutzbar. Zwischendurch *Cancel*, dann *Go on copying*: Es geht weiter und kopiert nur den Rest. +3. Wenn alles kopiert ist: Eine Datei auf einer Freigabe ändern, dann *Switch now*. Die Freigaben sind kurz weg und kommen wieder; danach zeigt *Shares* bei jeder Freigabe das neue Laufwerk, *Users* das neue Laufwerk der persönlichen Ordner, *Storage* den App-Bereich auf `neu`. Die geänderte Datei ist da, Apps starten, Transmission und der Medienserver laufen. +4. Über SMB: Eine Freigabe und einen persönlichen Ordner öffnen, ein paar Dateien und ihre Rechte vergleichen (ein Benutzer mit Nur-Lesen darf weiter nicht schreiben). Das alte Laufwerk ist unverändert; *Close* beendet den Assistenten. +5. Optional: Herunterfahren, die neue Platte in Schacht 1 (die alte heraus), starten: Alles kommt von der neuen Platte. + ## 14zx. Angemeldeter Name, hochgeladene Apps (0.3.0-beta.15, #191) 1. Als Administrator anmelden: Links neben der Uhr zeigt ein Feld mit Personensymbol den Kontonamen; der Tooltip sagt „Angemeldet“. Fenster schmal ziehen: Das Feld rutscht mit der Uhr nach links. diff --git a/docs/TESTING.md b/docs/TESTING.md index 00c73e46..2a09b296 100644 --- a/docs/TESTING.md +++ b/docs/TESTING.md @@ -525,6 +525,16 @@ Needs a Tailscale account (free), a phone or computer with Tailscale, the file ` 5. An account without a personal folder: sharing shows "no personal folder"; the shared item is dropped and does not come back at the next login. 6. File dialog of an app for an account **without** *Files* (e.g. Webpad → *Open*): the list of folders shows *App data* first, then *My folder* and the user's shares; read-only shares are marked and are missing when saving. The app still keeps its own files in *App data*. +## 14zy. Disk change (0.3.0-beta.16) + +Needs a second disk (bay or USB case) that may be erased. **Not on a box with data you cannot lose without a backup.** + +1. *Storage → Drives*: set up the second disk as a single drive with ext4 (e.g. `neu`). *Storage → DISK CHANGE*: old drive = the drive with your data, new drive = `neu`, *Check*: shares, personal folders, app area and the amount of data are listed. Choosing the same drive twice, or a drive with data, shows the reason and *Start copying* stays off. +2. *Start copying*: the bar moves; shares stay usable. *Cancel* in between, then *Go on copying*: it goes on and copies only the rest. +3. When everything is copied: change a file on a share, then *Switch now*. Shares are gone for a moment and come back; afterwards *Shares* shows the new drive for every share, *Users* the new drive for personal folders, *Storage* the app area on `neu`. The changed file is there, apps start, Transmission and the media server work. +4. Over SMB: open a share and a personal folder, compare a few files and their rights (a read-only user still cannot write). The old drive is unchanged; *Close* ends the wizard. +5. Optional: shut down, put the new disk into bay 1 (the old one out), start: everything comes up from the new disk. + ## 14zx. Signed-in name, uploaded apps (0.3.0-beta.15, #191) 1. Sign in as an administrator: left of the clock, a field with a person icon shows the account name; hovering it says "Signed in". Make the window narrow: the field moves left with the clock. diff --git a/src/shareos-core/parts/rpc/ORDER b/src/shareos-core/parts/rpc/ORDER index f870a005..9a1aadfd 100644 --- a/src/shareos-core/parts/rpc/ORDER +++ b/src/shareos-core/parts/rpc/ORDER @@ -14,6 +14,7 @@ paperless.uc cloud.uc devices.uc snapshots.uc +migrate.uc apps.uc files.uc files-jobs.uc diff --git a/src/shareos-core/parts/rpc/migrate.uc b/src/shareos-core/parts/rpc/migrate.uc new file mode 100644 index 00000000..c4fd8fe1 --- /dev/null +++ b/src/shareos-core/parts/rpc/migrate.uc @@ -0,0 +1,66 @@ +/* ---------- disk change: everything from one drive to another (shareos-migrate) ---------- */ + +const MIGRATE = '/usr/sbin/shareos-migrate'; + +function migrate_tool(args) { + let r = sh(MIGRATE + ' ' + join(' ', map(args, shq))); + let j = jparse(trim(r.out) || 'null'); + return type(j) == 'object' ? j : { error: trim(r.out) || 'failed' }; +} + +// a volume name as the storage tool takes it +function migrate_vol(v) { return type(v) == 'string' && match(v, /^[a-z0-9][a-z0-9_-]{0,15}$/); } + +/* ========== methods (joined after the helpers of all parts, see build-parts.sh) ========== */ + +add_methods({ + 'shareos.migrate': { + // what moves from to , and whether it can + plan: { + args: { from: '', to: '' }, + call: function(req) { + let a = req.args; + if (!migrate_vol(a.from) || !migrate_vol(a.to)) return { error: 'invalid drive' }; + return migrate_tool([ 'plan', a.from, a.to ]); + } + }, + + state: { + call: function() { return migrate_tool([ 'state' ]); } + }, + + // copy in the background; a stopped copy goes on where it was + copy: { + args: { from: '', to: '' }, + call: function(req) { + let a = req.args; + if (flash_busy()) return { error: FLASH_BUSY }; + if (!migrate_vol(a.from) || !migrate_vol(a.to)) return { error: 'invalid drive' }; + if (storage_job()?.state == 'running') return { error: 'a storage job is already running' }; + return migrate_tool([ 'copy', a.from, a.to ]); + } + }, + + cancel: { + call: function() { return migrate_tool([ 'cancel' ]); } + }, + + // services stop, last copy, settings point to the new drive, services + // start – in the background (can take minutes); the page polls state + switch: { + args: { confirm: false }, + call: function(req) { + if (req.args.confirm !== true) return { error: 'confirm must be true' }; + if (flash_busy()) return { error: FLASH_BUSY }; + let s = migrate_tool([ 'state' ]); + if (s.state != 'copied') return { error: 'copy everything first' }; + system(sprintf('start-stop-daemon -S -b -x %s -- switch', MIGRATE)); + return { started: true }; + } + }, + + clear: { + call: function() { return migrate_tool([ 'clear' ]); } + } + } +}); diff --git a/src/shareos-core/parts/web/ORDER b/src/shareos-core/parts/web/ORDER index e57b26d7..75cc8d47 100644 --- a/src/shareos-core/parts/web/ORDER +++ b/src/shareos-core/parts/web/ORDER @@ -16,6 +16,7 @@ snapshots.js devices.js me.js storage.js +migrate.js smart.js system-general.js system-network.js diff --git a/src/shareos-core/parts/web/core.js b/src/shareos-core/parts/web/core.js index 41a83ce6..bffd758e 100644 --- a/src/shareos-core/parts/web/core.js +++ b/src/shareos-core/parts/web/core.js @@ -195,7 +195,7 @@ const TABS = [ const SYS_SUBS = [['general', 'GENERAL'], ['appearance', 'APPEARANCE'], ['network', 'NETWORK'], ['notifications', 'MESSAGES'], ['logs', 'LOGS'], ['terminal', 'TERMINAL'], ['time', 'TIME'], ['power', 'POWER & RESET'], ['firmware', 'FIRMWARE']]; const SVC_SUBS = [['status', 'STATUS'], ['autostart', 'AUTOSTART'], ['dlna', 'MEDIA SERVER'], ['printer', 'PRINTERS'], ['ups', 'UPS'], ['torrent', 'TORRENTS']]; const SHR_SUBS = [['shares', 'SHARES'], ['files', 'FILES'], ['users', 'USER'], ['groups', 'GROUPS']]; -const STO_SUBS = [['volumes', 'DRIVES'], ['health', 'HEALTH'], ['snapshots', 'SNAPSHOTS']]; +const STO_SUBS = [['volumes', 'DRIVES'], ['health', 'HEALTH'], ['snapshots', 'SNAPSHOTS'], ['move', 'DISK CHANGE']]; const ROLE_TXT = { admin: 'Administrator', user: 'User', share: 'Shares only' }; // pages that moved: old link -> new place const SUB_MOVED = { hardware: 'power', https: 'network', about: 'general' }; diff --git a/src/shareos-core/parts/web/migrate.js b/src/shareos-core/parts/web/migrate.js new file mode 100644 index 00000000..d93bc862 --- /dev/null +++ b/src/shareos-core/parts/web/migrate.js @@ -0,0 +1,125 @@ +/* ---------- disk change: everything from one drive to another (shareos.migrate) ---------- */ + +// S.mig: { vols, from, to, plan, st } – st is the state of the job on the box +const MIG_FS = ['ext4', 'ext3', 'btrfs']; +const migBusy = (st) => st && (st.state === 'copying' || st.state === 'switching'); + +function migChooser(m) { + const vols = (m.vols || []).filter((v) => v.mounted); + const sel = (id, val, list) => html``; + const p = m.plan; + return html`
+
1 · CHOOSE THE DRIVES
+
+ + +
+

The new drive must be set up and empty, with ext4 or Btrfs. It can be in the second bay or in a USB case – after the move it can go into a bay. Set it up first under Drives. An old disk in a USB case is added there without erasing it (a disk with data).

+ ${p ? html`
+
+
Shares
${p.shares.length ? p.shares.join(', ') : '–'}
+
Personal folders
${p.homes.length ? p.homes.join(', ') : '–'}
+
App area
${p.apps ? 'moves along' : '–'}
+
Snapshot jobs
${p.snapshot_jobs.length ? p.snapshot_jobs.join(', ') : '–'}
+
Data
${fmtBytes(p.used)} · free on the new drive: ${fmtBytes(p.free)}
+
+ ${p.ok ? '' : html``} +

Everything on the old drive is copied – also folders that are not shared – except the snapshots. Owners, permissions and ACLs stay. The old drive is not changed.

+
` : ''} +
+ + +
+
`; +} + +function migProgress(st) { + const sw = st.state === 'switching'; + return html`
+
${sw ? '3 · SWITCHING' : '2 · COPYING'}${st.from} → ${st.to}
+
+

${sw ? html`Services are stopped for the last copy – shares are back in a moment.` + : html`${st.percent} % · ${fmtBytes(st.done)} of ${fmtBytes(st.total)}`}

+ ${sw ? '' : html`

The box can be used while it copies. What changes until the switch is copied then.

+
`} +
`; +} + +function migrateView() { + const m = S.mig || (S.mig = {}), st = m.st; + if (!st) return html`
Loading …
`; + let body; + if (migBusy(st)) body = migProgress(st); + else if (st.state === 'copied') body = html`
+
3 · SWITCH${st.from} → ${st.to}
+

Everything is copied.

+

Switching stops shares, apps, downloads and the media server for a short time, copies what changed since and then points shares, personal folders, the app area, the USB copy and snapshot jobs to the new drive.

+ ${st.error ? html`` : ''} +
+
`; + else if (st.state === 'done') body = html`
+
DONE${st.from} → ${st.to}
+

Shares, personal folders and the app area are now on the new drive.

+

The old drive is unchanged. When everything works, forget it under Drives and take the disk out – or keep it as a backup.

+
`; + else if (st.state === 'cancelled' || st.state === 'error') body = html`
+
2 · COPYING${st.from} → ${st.to}
+ +
+
`; + else body = migChooser(m); + return html`
+

MOVE TO A NEW DRIVE

+

Copies everything from an old drive to a new one – shares, personal folders and the app area – and then switches over, so that nothing has to be set up again.

+ ${body} +
`; +} + +async function loadMigrate() { + clearTimeout(S.migTimer); + const m = S.mig || (S.mig = {}); + try { + m.st = await rpc('shareos.migrate', 'state'); + if (!m.vols) m.vols = (await rpc('shareos.storage', 'volumes')).volumes || []; + if (!document.activeElement?.matches('select')) renderMain(); + if (S.route.tab === 'storage' && S.route.sub === 'move' && (migBusy(m.st) || m.switching)) S.migTimer = setTimeout(loadMigrate, 3000); + if (m.st.state !== 'copied') m.switching = false; + } catch (e) { + if (e.code !== 'auth') toast('Move: ' + e.message, true); + } +} + +function migrateAfter() { + // on entering the page (and at most every 10 s while it is drawn again) + const m = S.mig || (S.mig = {}); + if (!m.t || Date.now() - m.t > 10000) { m.t = Date.now(); loadMigrate(); } + for (const id of ['mig-from', 'mig-to']) + $('#' + id)?.addEventListener('change', (e) => { S.mig[id === 'mig-from' ? 'from' : 'to'] = e.target.value; S.mig.plan = null; renderMain(); }); +} + +Object.assign(ACTIONS, { + async 'mig-plan'() { + try { S.mig.plan = await rpc('shareos.migrate', 'plan', { from: S.mig.from, to: S.mig.to }); renderMain(); } + catch (e) { toast(e.message, true); } + }, + async 'mig-copy'() { + try { await rpc('shareos.migrate', 'copy', { from: S.mig.from, to: S.mig.to }); S.mig.plan = null; loadMigrate(); } + catch (e) { toast(e.message, true); } + }, + async 'mig-resume'() { + try { await rpc('shareos.migrate', 'copy', { from: S.mig.st.from, to: S.mig.st.to }); loadMigrate(); } + catch (e) { toast(e.message, true); } + }, + async 'mig-cancel'() { + if (!await confirmDlg('Stop copying?', 'What is copied stays on the new drive; going on later copies only the rest.', 'Stop')) return; + try { await rpc('shareos.migrate', 'cancel'); loadMigrate(); } catch (e) { toast(e.message, true); } + }, + async 'mig-switch'() { + if (!await confirmDlg('Switch to the new drive now?', 'Shares, apps, downloads and the media server stop for the last copy and start again on the new drive. Open files on the network are closed.', 'Switch now')) return; + try { await rpc('shareos.migrate', 'switch', { confirm: true }); S.mig.switching = true; S.mig.st = { ...S.mig.st, state: 'switching' }; renderMain(); loadMigrate(); } + catch (e) { toast(e.message, true); } + }, + async 'mig-clear'() { + try { await rpc('shareos.migrate', 'clear'); S.mig = { t: Date.now() }; loadMigrate(); } catch (e) { toast(e.message, true); } + } +}); diff --git a/src/shareos-core/parts/web/overview.js b/src/shareos-core/parts/web/overview.js index 734ea475..72859a4a 100644 --- a/src/shareos-core/parts/web/overview.js +++ b/src/shareos-core/parts/web/overview.js @@ -124,7 +124,7 @@ const VIEWS = { const sub = S.route.sub; return html` - ${sub === 'snapshots' ? snapshotsView() : sub === 'health' ? healthView() : storageView()}`; + ${sub === 'snapshots' ? snapshotsView() : sub === 'health' ? healthView() : sub === 'move' ? migrateView() : storageView()}`; }, shares() { diff --git a/src/shareos-core/parts/web/storage.js b/src/shareos-core/parts/web/storage.js index 113dd748..c7fe7b4e 100644 --- a/src/shareos-core/parts/web/storage.js +++ b/src/shareos-core/parts/web/storage.js @@ -316,6 +316,7 @@ async function loadStorage() { Object.assign(VIEWS_AFTER, { storage() { if (S.route.sub === 'snapshots') { snapAfter(); return; } + if (S.route.sub === 'move') { migrateAfter(); return; } if (!S.stActive) loadStorage(); $('#smart-sched')?.addEventListener('change', async (e) => { try { await rpc('shareos.storage', 'smart_schedule', { mode: e.target.value }); S.storage.smart_schedule = e.target.value; toast('Schedule saved.'); } diff --git a/src/shareos-core/usr/sbin/shareos-migrate b/src/shareos-core/usr/sbin/shareos-migrate new file mode 100755 index 00000000..c8067b9e --- /dev/null +++ b/src/shareos-core/usr/sbin/shareos-migrate @@ -0,0 +1,230 @@ +#!/bin/sh +# +# shareos-migrate – move everything from one drive to another (disk change) +# +# shareos-migrate plan what moves, used and free space, problems (JSON) +# shareos-migrate copy copy in the background (rsync); a new run +# copies only what is missing +# shareos-migrate state state of the job (JSON) +# shareos-migrate cancel stop the copy – what is copied stays +# shareos-migrate switch stop the services, copy what changed since, +# point shares, personal folders, app area, +# USB copy and snapshot jobs to , start +# the services again +# shareos-migrate clear forget a finished or failed job +# +# Everything on is copied except lost+found and Snapshots/: shares, +# personal folders (home/), the app area (.shareos/) and folders that are not +# shared. rsync -aHAX --numeric-ids keeps owners, rights, ACLs and hard links. +# is not changed; forgetting it is a step of its own (Storage). +# must be a mounted ext4/btrfs volume that holds nothing yet (lost+found). +# The disk of may sit in the second bay or in a USB case and go into a +# bay afterwards – volumes are found by their UUID. + +ROOT=${SHAREOS_ROOT:-} +MNT=$ROOT/mnt +ST=$ROOT/tmp/shareos-migrate +INIT=$ROOT/etc/init.d + +u() { uci -q ${ROOT:+-c "$ROOT/etc/config"} "$@"; } +log() { logger -t shareos-migrate "$*" 2>/dev/null; } +die() { printf '{"error":"%s"}\n' "$*"; exit 1; } +# JSON string (names and paths here have no quotes or backslashes) +js() { printf '"%s"' "$(printf '%s' "$1" | sed 's/\\/\\\\/g; s/"/\\"/g')"; } + +mounted() { + [ -n "$SHAREOS_MIGRATE_TEST" ] && { [ -d "$1" ]; return; } + grep -q " $1 " /proc/mounts +} +fstype() { + [ -n "$SHAREOS_MIGRATE_TEST" ] && { echo "${SHAREOS_MIGRATE_FS:-ext4}"; return; } + awk -v m="$1" '$2 == m { print $3; exit }' /proc/mounts +} +# used / free bytes of a mounted volume, 0 when it is not there (the test +# suite counts the files and sets the free space) +used() { + if [ -n "$SHAREOS_MIGRATE_TEST" ]; then v=$(du -sk "$1" 2>/dev/null | awk '{ print $1 * 1024 }') + else v=$(df -Pk "$1" 2>/dev/null | awk 'NR == 2 { print $3 * 1024 }'); fi + echo "${v:-0}" +} +avail() { + if [ -n "$SHAREOS_MIGRATE_FREE" ]; then v=$SHAREOS_MIGRATE_FREE + else v=$(df -Pk "$1" 2>/dev/null | awk 'NR == 2 { print $4 * 1024 }'); fi + echo "${v:-0}" +} +# what is on a volume besides lost+found and the snapshots +content() { + for f in "$1"/* "$1"/.[!.]* "$1"/..?*; do + [ -e "$f" ] || [ -L "$f" ] || continue + case "${f##*/}" in lost+found|Snapshots|.shareos-migrate-from) ;; *) echo "${f##*/}" ;; esac + done +} + +check() { # [resume]: prints the first problem, or nothing + case "$1" in *[!a-z0-9_-]*|'') echo "invalid drive"; return ;; esac + case "$2" in *[!a-z0-9_-]*|'') echo "invalid drive"; return ;; esac + [ "$1" != "$2" ] || { echo "source and target are the same drive"; return; } + for v in "$1" "$2"; do + [ "$(u get storage."$v")" = volume ] || { echo "unknown drive $v"; return; } + mounted "$MNT/$v" || { echo "drive $v is not mounted"; return; } + done + case "$(fstype "$MNT/$2")" in + ext4|ext3|btrfs) ;; + *) echo "the new drive needs ext4 or btrfs (owners, personal folders, app area)"; return ;; + esac + # a copy that was stopped goes on into the same drive: what is there counts + if [ "$3" = resume ]; then + [ "$(( $(avail "$MNT/$2") + $(used "$MNT/$2") ))" -ge "$(used "$MNT/$1")" ] || { echo "not enough free space on the new drive"; return; } + else + [ -z "$(content "$MNT/$2")" ] || { echo "the new drive is not empty – choose an empty drive"; return; } + [ "$(avail "$MNT/$2")" -ge "$(used "$MNT/$1")" ] || { echo "not enough free space on the new drive"; return; } + fi +} + +# shares / accounts / jobs that point to a volume +shares_on() { u show shares | sed -n "s/^shares\.\([a-z0-9_-]*\)\.volume='\{0,1\}$1'\{0,1\}\$/\1/p"; } +homes_on() { u show accounts | sed -n "s/^accounts\.\([a-z0-9_-]*\)\.home='\{0,1\}$1'\{0,1\}\$/\1/p"; } +snaps_on() { u show snapshots 2>/dev/null | sed -n "s/^snapshots\.\([a-z0-9_-]*\)\.target='\{0,1\}$1'\{0,1\}\$/\1/p"; } +list() { first=1; printf '['; for x in "$@"; do [ $first = 1 ] || printf ','; first=0; js "$x"; done; printf ']'; } + +# a copy into was started before (state lost by a restart, or stopped) +resume_of() { [ "$(cat "$MNT/$2/.shareos-migrate-from" 2>/dev/null)" = "$1" ] && echo resume; } + +cmd_plan() { + p=$(check "$1" "$2" "$(resume_of "$1" "$2")") + # shellcheck disable=SC2046 + printf '{"from":%s,"to":%s,"shares":%s,"homes":%s,"apps":%s,"snapshot_jobs":%s,"used":%s,"free":%s,"ok":%s,"problem":%s}\n' \ + "$(js "$1")" "$(js "$2")" "$(list $(shares_on "$1"))" "$(list $(homes_on "$1"))" \ + "$([ "$(u get storage.global.apps)" = "$1" ] && echo true || echo false)" "$(list $(snaps_on "$1"))" \ + "$(used "$MNT/$1")" "$(avail "$MNT/$2")" \ + "$([ -z "$p" ] && echo true || echo false)" "$(js "$p")" +} + +state_set() { # key=value … into the state file (values: numbers or strings) + mkdir -p "$ST" + keys=$(for kv in "$@"; do printf '%s|' "${kv%%=*}"; done) + { for kv in "$@"; do echo "$kv"; done + [ -f "$ST/state" ] && grep -v -E "^(${keys%|})=" "$ST/state"; } > "$ST/state.$$" + mv "$ST/state.$$" "$ST/state" +} +sget() { sed -n "s/^$1=//p" "$ST/state" 2>/dev/null | head -1; } +num() { v=$(sget "$1"); echo "${v:-0}"; } + +# rsync of everything but lost+found and Snapshots; $3: extra options +# (exit code 24: files vanished while copying – fine for a running box) +sync_all() { + # shellcheck disable=SC2086 + rsync -aHAX --numeric-ids --exclude=/lost+found --exclude=/Snapshots --exclude=/.shareos-migrate-from $3 "$MNT/$1/" "$MNT/$2/" + rc=$? + [ $rc = 0 ] || [ $rc = 24 ] +} + +running() { pid=$(cat "$ST/pid" 2>/dev/null) && [ -n "$pid" ] && kill -0 "$pid" 2>/dev/null; } + +cmd_copy() { + running && die "a move is already running" + # a copy that was stopped – also by a restart, which empties /tmp – goes on + # into the same drive: the new drive notes where its data comes from + p=$(check "$1" "$2" "$(resume_of "$1" "$2")") + [ -z "$p" ] || die "$p" + mkdir -p "$ST" + echo "$1" > "$MNT/$2/.shareos-migrate-from" + state_set state=copying from="$1" to="$2" total="$(used "$MNT/$1")" done="$(used "$MNT/$2")" percent=0 started="$(date +%s)" error= + log "copy $1 -> $2 started" + # setsid: cancel stops rsync with its whole group + # shellcheck disable=SC2016 + setsid sh -c '"$0" _copy "$1" "$2" >"$3/rsync.log" 2>&1' "$0" "$1" "$2" "$ST" /dev/null 2>&1 & + echo $! > "$ST/pid" + printf '{"ok":true}\n' +} + +# the copy itself (in the background); the progress is how much the new +# drive holds – right also after a copy that was stopped and goes on +cmd__copy() { + sync_all "$1" "$2" & + r=$! + while kill -0 $r 2>/dev/null; do + sleep "${SHAREOS_MIGRATE_POLL:-3}" + d=$(used "$MNT/$2") t=$(num total) + state_set done="$d" percent="$(awk -v d="$d" -v t="$t" 'BEGIN { p = t > 0 ? int(d * 100 / t) : 0; print (p > 99 ? 99 : p) }')" + done + if wait $r && [ "$(sget state)" = copying ]; then + state_set state=copied percent=100 finished="$(date +%s)" + log "copy $1 -> $2 done" + elif [ "$(sget state)" = copying ]; then + state_set state=error error="copy failed – see the log; starting again copies only what is missing" + log "copy $1 -> $2 failed" + fi + rm -f "$ST/pid" +} + +cmd_cancel() { + running || die "no move is running" + kill -TERM -"$pid" 2>/dev/null || kill -TERM "$pid" + rm -f "$ST/pid" + state_set state=cancelled + log "copy cancelled" + printf '{"ok":true}\n' +} + +cmd_state() { + [ -f "$ST/state" ] || { printf '{"state":"none"}\n'; return; } + s=$(sget state) + # a copy whose process is gone (reboot, killed) is no longer running + if [ "$s" = copying ] && ! running; then s=cancelled; state_set state=cancelled; fi + printf '{"state":%s,"from":%s,"to":%s,"total":%s,"done":%s,"percent":%s,"started":%s,"error":%s}\n' \ + "$(js "$s")" "$(js "$(sget from)")" "$(js "$(sget to)")" "$(num total)" \ + "$(num 'done')" "$(num percent)" "$(num started)" "$(js "$(sget error)")" +} + +services() { # stop | start: everything that writes to the drives + if [ "$1" = stop ]; then + for s in S90services S52tremote S51apps S70shares; do [ -x "$INIT/$s" ] && "$INIT/$s" stop >/dev/null 2>&1; done + else + for s in S70shares S51apps S52tremote S90services; do [ -x "$INIT/$s" ] && "$INIT/$s" start >/dev/null 2>&1; done + fi +} + +cmd_switch() { + running && die "the copy is still running" + [ "$(sget state)" = copied ] || die "copy everything first" + from=$(sget from) to=$(sget to) + for v in "$from" "$to"; do mounted "$MNT/$v" || die "drive $v is not mounted"; done + state_set state=switching + log "switch $from -> $to: services stop" + services stop + # what changed since the copy, and what was deleted since + if ! sync_all "$from" "$to" --delete >"$ST/rsync.log" 2>&1; then + services start + state_set state=copied error="the last copy before switching failed – nothing was switched" + die "the last copy before switching failed – nothing was switched" + fi + for s in $(shares_on "$from"); do u set shares."$s".volume="$to"; done + for a in $(homes_on "$from"); do u set accounts."$a".home="$to"; done + for j in $(snaps_on "$from"); do u set snapshots."$j".target="$to"; done + [ "$(u get storage.global.apps)" = "$from" ] && u set storage.global.apps="$to" + [ "$(u get shareos.usbcopy.volume)" = "$from" ] && u set shareos.usbcopy.volume="$to" + u commit + rm -f "$MNT/$to/.shareos-migrate-from" + services start + state_set state=done finished="$(date +%s)" error= + log "switch $from -> $to done" + printf '{"ok":true}\n' +} + +cmd_clear() { + running && die "a move is running" + rm -rf "$ST" + printf '{"ok":true}\n' +} + +case "$1" in + plan) cmd_plan "$2" "$3" ;; + copy) cmd_copy "$2" "$3" ;; + _copy) cmd__copy "$2" "$3" ;; + state) cmd_state ;; + cancel) cmd_cancel ;; + switch) cmd_switch ;; + clear) cmd_clear ;; + *) sed -n '3,14p' "$0" | sed 's/^# \{0,1\}//'; exit 1 ;; +esac diff --git a/src/shareos-core/usr/share/rpcd/acl.d/shareos.json b/src/shareos-core/usr/share/rpcd/acl.d/shareos.json index 59895537..8348c441 100644 --- a/src/shareos-core/usr/share/rpcd/acl.d/shareos.json +++ b/src/shareos-core/usr/share/rpcd/acl.d/shareos.json @@ -126,6 +126,10 @@ ], "shareos.tremote": [ "get" + ], + "shareos.migrate": [ + "plan", + "state" ] } }, @@ -333,6 +337,12 @@ "shareos.tremote": [ "set", "revoke" + ], + "shareos.migrate": [ + "copy", + "cancel", + "switch", + "clear" ] } } diff --git a/src/shareos-core/www/i18n/ar.json b/src/shareos-core/www/i18n/ar.json index 93d92018..86c0a7a5 100644 --- a/src/shareos-core/www/i18n/ar.json +++ b/src/shareos-core/www/i18n/ar.json @@ -1739,7 +1739,48 @@ "Install from an unsigned source?": "التثبيت من مصدر غير موقَّع؟", "This app comes from a store source without a valid signature of the ShareOS project.": "يأتي هذا التطبيق من مصدر متجر بلا توقيع صالح من مشروع ShareOS.", "Its checksum only shows that the download is complete – not who made it.": "مجموع التحقق يبيّن فقط أن التنزيل مكتمل – لا من صنعه.", - "catalog signature missing or invalid – not used": "توقيع الكتالوج مفقود أو غير صالح – لم يُستخدم" + "catalog signature missing or invalid – not used": "توقيع الكتالوج مفقود أو غير صالح – لم يُستخدم", + "MOVE TO A NEW DRIVE": "النقل إلى محرك جديد", + "DISK CHANGE": "تبديل القرص", + "Copies everything from an old drive to a new one – shares, personal folders and the app area – and then switches over, so that nothing has to be set up again.": "ينسخ كل شيء من محرك قديم إلى محرك جديد – المشاركات والمجلدات الشخصية ومنطقة التطبيقات – ثم يبدّل إليه، فلا حاجة لإعداد أي شيء من جديد.", + "1 · CHOOSE THE DRIVES": "1 · اختيار المحركات", + "OLD DRIVE (FROM)": "المحرك القديم (من)", + "NEW DRIVE (TO)": "المحرك الجديد (إلى)", + "The new drive must be set up and empty, with ext4 or Btrfs. It can be in the second bay or in a USB case – after the move it can go into a bay. Set it up first under": "يجب أن يكون المحرك الجديد مُعدًّا وفارغًا، بنظام ext4 أو Btrfs. يمكن أن يكون في الحجرة الثانية أو في علبة USB – وبعد النقل يمكن وضعه في حجرة. أعدّه أولاً في", + "An old disk in a USB case is added there without erasing it (a disk with data).": "يُضاف هناك القرص القديم في علبة USB دون مسحه (قرص يحتوي على بيانات).", + "Personal folders": "المجلدات الشخصية", + "Snapshot jobs": "مهام اللقطات", + "Data": "البيانات", + "moves along": "يُنقل أيضًا", + "Everything on the old drive is copied – also folders that are not shared – except the snapshots. Owners, permissions and ACLs stay. The old drive is not changed.": "يُنسخ كل ما على المحرك القديم – حتى المجلدات غير المشاركة – عدا اللقطات. يبقى المالكون والأذونات وقوائم ACL. لا يتغير المحرك القديم.", + "Check": "تحقق", + "Start copying": "بدء النسخ", + "2 · COPYING": "2 · النسخ", + "3 · SWITCHING": "3 · جارٍ التبديل", + "3 · SWITCH": "3 · التبديل", + "Services are stopped for the last copy – shares are back in a moment.": "الخدمات متوقفة للنسخة الأخيرة – ستعود المشاركات بعد لحظة.", + "The box can be used while it copies. What changes until the switch is copied then.": "يمكن استخدام الجهاز أثناء النسخ. ما يتغير حتى التبديل يُنسخ حينها.", + "Everything is copied.": "تم نسخ كل شيء.", + "Switching stops shares, apps, downloads and the media server for a short time, copies what changed since and then points shares, personal folders, the app area, the USB copy and snapshot jobs to the new drive.": "يوقف التبديل المشاركات والتطبيقات والتنزيلات وخادم الوسائط لفترة قصيرة، وينسخ ما تغيّر منذ ذلك الحين، ثم يوجّه المشاركات والمجلدات الشخصية ومنطقة التطبيقات ونسخ USB ومهام اللقطات إلى المحرك الجديد.", + "Switch now": "بدّل الآن", + "DONE": "تم", + "Shares, personal folders and the app area are now on the new drive.": "أصبحت المشاركات والمجلدات الشخصية ومنطقة التطبيقات الآن على المحرك الجديد.", + "The old drive is unchanged. When everything works, forget it under": "المحرك القديم لم يتغير. عندما يعمل كل شيء، انسَه في", + "and take the disk out – or keep it as a backup.": "وأخرج القرص – أو احتفظ به نسخةً احتياطية.", + "The copy was stopped. Going on copies only what is missing.": "توقف النسخ. المتابعة تنسخ ما ينقص فقط.", + "Go on copying": "متابعة النسخ", + "Stop copying?": "إيقاف النسخ؟", + "What is copied stays on the new drive; going on later copies only the rest.": "ما نُسخ يبقى على المحرك الجديد؛ المتابعة لاحقًا تنسخ الباقي فقط.", + "Switch to the new drive now?": "التبديل إلى المحرك الجديد الآن؟", + "Shares, apps, downloads and the media server stop for the last copy and start again on the new drive. Open files on the network are closed.": "تتوقف المشاركات والتطبيقات والتنزيلات وخادم الوسائط للنسخة الأخيرة ثم تعمل من جديد على المحرك الجديد. تُغلق الملفات المفتوحة عبر الشبكة.", + "source and target are the same drive": "المصدر والهدف هما المحرك نفسه", + "the new drive needs ext4 or btrfs (owners, personal folders, app area)": "يحتاج المحرك الجديد إلى ext4 أو btrfs (المالكون، المجلدات الشخصية، منطقة التطبيقات)", + "the new drive is not empty – choose an empty drive": "المحرك الجديد ليس فارغًا – اختر محركًا فارغًا", + "not enough free space on the new drive": "لا توجد مساحة حرة كافية على المحرك الجديد", + "copy failed – see the log; starting again copies only what is missing": "فشل النسخ – راجع السجل؛ البدء من جديد ينسخ ما ينقص فقط", + "the last copy before switching failed – nothing was switched": "فشلت النسخة الأخيرة قبل التبديل – لم يُبدَّل شيء", + "copy everything first": "انسخ كل شيء أولاً", + "a move is already running": "هناك نقل قيد التشغيل بالفعل" }, "patterns": [ [ @@ -2126,6 +2167,10 @@ "^personal inbox of (.+) · token (.+)$", "وارد شخصي لـ $1 · رمز $2" ], + [ + "^(\\S+ \\S+) · free on the new drive: (\\S+ \\S+)$", + "$1 · المساحة الحرة على المحرك الجديد: $2" + ], [ "^(\\S+): no longer starts at boot$", "$1: لم يعد يعمل عند التشغيل" @@ -2210,6 +2255,10 @@ "^failed (\\S+): ubiupdatevol$", "فشل ($1): تعذّرت كتابة النظام (ubiupdatevol)" ], + [ + "^drive (\\S+) is not mounted$", + "المحرك $1 غير موصول" + ], [ "^shared inbox · token (.+)$", "صندوق وارد مشترك · الرمز $1" @@ -2486,6 +2535,10 @@ "^(\\S+) downloading …$", "جارٍ تنزيل $1 …" ], + [ + "^unknown drive (\\S+)$", + "محرك غير معروف $1" + ], [ "^User “(.+)” saved\\.$", "حُفظ المستخدم «$1»." diff --git a/src/shareos-core/www/i18n/bn.json b/src/shareos-core/www/i18n/bn.json index c892a8ce..2614278a 100644 --- a/src/shareos-core/www/i18n/bn.json +++ b/src/shareos-core/www/i18n/bn.json @@ -1739,7 +1739,48 @@ "Install from an unsigned source?": "স্বাক্ষরবিহীন উৎস থেকে ইনস্টল করবেন?", "This app comes from a store source without a valid signature of the ShareOS project.": "এই অ্যাপটি এমন একটি স্টোর উৎস থেকে এসেছে যাতে ShareOS প্রকল্পের কোনো বৈধ স্বাক্ষর নেই।", "Its checksum only shows that the download is complete – not who made it.": "এর চেকসাম শুধু দেখায় যে ডাউনলোড সম্পূর্ণ – কে এটি তৈরি করেছে তা নয়।", - "catalog signature missing or invalid – not used": "ক্যাটালগের স্বাক্ষর নেই বা অবৈধ – ব্যবহার করা হয়নি" + "catalog signature missing or invalid – not used": "ক্যাটালগের স্বাক্ষর নেই বা অবৈধ – ব্যবহার করা হয়নি", + "MOVE TO A NEW DRIVE": "নতুন ড্রাইভে সরান", + "DISK CHANGE": "ডিস্ক বদল", + "Copies everything from an old drive to a new one – shares, personal folders and the app area – and then switches over, so that nothing has to be set up again.": "পুরোনো ড্রাইভ থেকে সবকিছু নতুন ড্রাইভে কপি করে – শেয়ার, ব্যক্তিগত ফোল্ডার ও অ্যাপ এলাকা – তারপর সেখানে বদলে নেয়, যাতে কিছুই আবার সেট আপ করতে না হয়।", + "1 · CHOOSE THE DRIVES": "1 · ড্রাইভ বেছে নিন", + "OLD DRIVE (FROM)": "পুরোনো ড্রাইভ (থেকে)", + "NEW DRIVE (TO)": "নতুন ড্রাইভ (তে)", + "The new drive must be set up and empty, with ext4 or Btrfs. It can be in the second bay or in a USB case – after the move it can go into a bay. Set it up first under": "নতুন ড্রাইভটি সেট আপ করা ও খালি হতে হবে, ext4 বা Btrfs সহ। এটি দ্বিতীয় বে-তে বা USB কেসে থাকতে পারে – সরানোর পরে এটি বে-তে লাগানো যায়। প্রথমে এখানে সেট আপ করুন:", + "An old disk in a USB case is added there without erasing it (a disk with data).": "USB কেসের পুরোনো ডিস্ক সেখানে না মুছে যোগ করা হয় (ডেটাসহ ডিস্ক)।", + "Personal folders": "ব্যক্তিগত ফোল্ডার", + "Snapshot jobs": "স্ন্যাপশট কাজ", + "Data": "ডেটা", + "moves along": "সঙ্গে সরে যায়", + "Everything on the old drive is copied – also folders that are not shared – except the snapshots. Owners, permissions and ACLs stay. The old drive is not changed.": "পুরোনো ড্রাইভের সবকিছু কপি হয় – শেয়ার না করা ফোল্ডারও – স্ন্যাপশট ছাড়া। মালিক, অনুমতি ও ACL থাকে। পুরোনো ড্রাইভ বদলানো হয় না।", + "Check": "যাচাই করুন", + "Start copying": "কপি শুরু করুন", + "2 · COPYING": "2 · কপি হচ্ছে", + "3 · SWITCHING": "3 · বদলানো হচ্ছে", + "3 · SWITCH": "3 · বদল", + "Services are stopped for the last copy – shares are back in a moment.": "শেষ কপির জন্য সেবাগুলো থেমে আছে – শেয়ার একটু পরেই ফিরে আসবে।", + "The box can be used while it copies. What changes until the switch is copied then.": "কপি চলার সময় বক্স ব্যবহার করা যায়। বদলের আগে যা বদলায়, তা তখন কপি হয়।", + "Everything is copied.": "সবকিছু কপি হয়েছে।", + "Switching stops shares, apps, downloads and the media server for a short time, copies what changed since and then points shares, personal folders, the app area, the USB copy and snapshot jobs to the new drive.": "বদলের সময় শেয়ার, অ্যাপ, ডাউনলোড ও মিডিয়া সার্ভার অল্প সময় থামে, তারপর থেকে যা বদলেছে তা কপি হয়, তারপর শেয়ার, ব্যক্তিগত ফোল্ডার, অ্যাপ এলাকা, USB কপি ও স্ন্যাপশট কাজ নতুন ড্রাইভে নির্দেশ করে।", + "Switch now": "এখনই বদলান", + "DONE": "সম্পন্ন", + "Shares, personal folders and the app area are now on the new drive.": "শেয়ার, ব্যক্তিগত ফোল্ডার ও অ্যাপ এলাকা এখন নতুন ড্রাইভে।", + "The old drive is unchanged. When everything works, forget it under": "পুরোনো ড্রাইভ অপরিবর্তিত। সব ঠিক চললে এটি এখানে ভুলে যান:", + "and take the disk out – or keep it as a backup.": "এবং ডিস্কটি খুলে নিন – অথবা ব্যাকআপ হিসেবে রাখুন।", + "The copy was stopped. Going on copies only what is missing.": "কপি থামানো হয়েছে। চালিয়ে গেলে শুধু যা বাকি তা কপি হবে।", + "Go on copying": "কপি চালিয়ে যান", + "Stop copying?": "কপি থামাবেন?", + "What is copied stays on the new drive; going on later copies only the rest.": "যা কপি হয়েছে তা নতুন ড্রাইভে থাকে; পরে চালালে শুধু বাকিটা কপি হবে।", + "Switch to the new drive now?": "এখনই নতুন ড্রাইভে বদলাবেন?", + "Shares, apps, downloads and the media server stop for the last copy and start again on the new drive. Open files on the network are closed.": "শেষ কপির জন্য শেয়ার, অ্যাপ, ডাউনলোড ও মিডিয়া সার্ভার থামে এবং নতুন ড্রাইভে আবার চালু হয়। নেটওয়ার্কে খোলা ফাইল বন্ধ হয়ে যায়।", + "source and target are the same drive": "উৎস ও লক্ষ্য একই ড্রাইভ", + "the new drive needs ext4 or btrfs (owners, personal folders, app area)": "নতুন ড্রাইভে ext4 বা btrfs লাগবে (মালিক, ব্যক্তিগত ফোল্ডার, অ্যাপ এলাকা)", + "the new drive is not empty – choose an empty drive": "নতুন ড্রাইভ খালি নয় – একটি খালি ড্রাইভ বেছে নিন", + "not enough free space on the new drive": "নতুন ড্রাইভে যথেষ্ট খালি জায়গা নেই", + "copy failed – see the log; starting again copies only what is missing": "কপি ব্যর্থ – লগ দেখুন; আবার শুরু করলে শুধু বাকিটা কপি হবে", + "the last copy before switching failed – nothing was switched": "বদলের আগের শেষ কপি ব্যর্থ – কিছুই বদলানো হয়নি", + "copy everything first": "প্রথমে সবকিছু কপি করুন", + "a move is already running": "একটি সরানো ইতিমধ্যে চলছে" }, "patterns": [ [ @@ -2126,6 +2167,10 @@ "^personal inbox of (.+) · token (.+)$", "$1-এর ব্যক্তিগত ইনবক্স · টোকেন $2" ], + [ + "^(\\S+ \\S+) · free on the new drive: (\\S+ \\S+)$", + "$1 · নতুন ড্রাইভে খালি: $2" + ], [ "^(\\S+): no longer starts at boot$", "$1: চালুর সময় আর শুরু হয় না" @@ -2210,6 +2255,10 @@ "^failed (\\S+): ubiupdatevol$", "ব্যর্থ ($1): সিস্টেম লেখা যায়নি (ubiupdatevol)" ], + [ + "^drive (\\S+) is not mounted$", + "ড্রাইভ $1 মাউন্ট করা নেই" + ], [ "^shared inbox · token (.+)$", "যৌথ ইনবক্স · টোকেন $1" @@ -2486,6 +2535,10 @@ "^(\\S+) downloading …$", "$1 ডাউনলোড হচ্ছে …" ], + [ + "^unknown drive (\\S+)$", + "অজানা ড্রাইভ $1" + ], [ "^User “(.+)” saved\\.$", "ব্যবহারকারী \"$1\" সংরক্ষিত।" diff --git a/src/shareos-core/www/i18n/de.json b/src/shareos-core/www/i18n/de.json index 2a857b57..bc2d6678 100644 --- a/src/shareos-core/www/i18n/de.json +++ b/src/shareos-core/www/i18n/de.json @@ -1739,7 +1739,48 @@ "Install from an unsigned source?": "Aus einer nicht signierten Quelle installieren?", "This app comes from a store source without a valid signature of the ShareOS project.": "Diese App stammt aus einer Store-Quelle ohne gültige Signatur des ShareOS-Projekts.", "Its checksum only shows that the download is complete – not who made it.": "Ihre Prüfsumme zeigt nur, dass der Download vollständig ist – nicht, wer sie gemacht hat.", - "catalog signature missing or invalid – not used": "Katalog-Signatur fehlt oder ist ungültig – nicht verwendet" + "catalog signature missing or invalid – not used": "Katalog-Signatur fehlt oder ist ungültig – nicht verwendet", + "MOVE TO A NEW DRIVE": "UMZUG AUF EIN NEUES LAUFWERK", + "DISK CHANGE": "PLATTENWECHSEL", + "Copies everything from an old drive to a new one – shares, personal folders and the app area – and then switches over, so that nothing has to be set up again.": "Kopiert alles von einem alten auf ein neues Laufwerk – Freigaben, persönliche Ordner und den App-Bereich – und schaltet dann um, sodass nichts neu eingerichtet werden muss.", + "1 · CHOOSE THE DRIVES": "1 · LAUFWERKE WÄHLEN", + "OLD DRIVE (FROM)": "ALTES LAUFWERK (VON)", + "NEW DRIVE (TO)": "NEUES LAUFWERK (NACH)", + "The new drive must be set up and empty, with ext4 or Btrfs. It can be in the second bay or in a USB case – after the move it can go into a bay. Set it up first under": "Das neue Laufwerk muss eingerichtet und leer sein, mit ext4 oder Btrfs. Es kann im zweiten Schacht oder in einem USB-Gehäuse stecken – nach dem Umzug kann es in einen Schacht. Zuerst einrichten unter", + "An old disk in a USB case is added there without erasing it (a disk with data).": "Eine alte Platte im USB-Gehäuse wird dort ohne Löschen hinzugefügt (Platte mit Daten).", + "Personal folders": "Persönliche Ordner", + "Snapshot jobs": "Snapshot-Aufträge", + "Data": "Daten", + "moves along": "zieht mit um", + "Everything on the old drive is copied – also folders that are not shared – except the snapshots. Owners, permissions and ACLs stay. The old drive is not changed.": "Alles auf dem alten Laufwerk wird kopiert – auch Ordner, die nicht freigegeben sind – außer den Snapshots. Besitzer, Rechte und ACLs bleiben. Das alte Laufwerk wird nicht verändert.", + "Check": "Prüfen", + "Start copying": "Kopieren starten", + "2 · COPYING": "2 · KOPIEREN", + "3 · SWITCHING": "3 · UMSCHALTEN LÄUFT", + "3 · SWITCH": "3 · UMSCHALTEN", + "Services are stopped for the last copy – shares are back in a moment.": "Die Dienste sind für den letzten Abgleich angehalten – die Freigaben sind gleich wieder da.", + "The box can be used while it copies. What changes until the switch is copied then.": "Die Box ist während des Kopierens benutzbar. Was sich bis zum Umschalten ändert, wird dann übernommen.", + "Everything is copied.": "Alles ist kopiert.", + "Switching stops shares, apps, downloads and the media server for a short time, copies what changed since and then points shares, personal folders, the app area, the USB copy and snapshot jobs to the new drive.": "Beim Umschalten halten Freigaben, Apps, Downloads und der Medienserver kurz an; was sich seitdem geändert hat, wird kopiert, dann zeigen Freigaben, persönliche Ordner, App-Bereich, USB-Kopie und Snapshot-Aufträge auf das neue Laufwerk.", + "Switch now": "Jetzt umschalten", + "DONE": "FERTIG", + "Shares, personal folders and the app area are now on the new drive.": "Freigaben, persönliche Ordner und der App-Bereich liegen jetzt auf dem neuen Laufwerk.", + "The old drive is unchanged. When everything works, forget it under": "Das alte Laufwerk ist unverändert. Wenn alles läuft, unter", + "and take the disk out – or keep it as a backup.": "vergessen und die Platte herausnehmen – oder als Sicherung behalten.", + "The copy was stopped. Going on copies only what is missing.": "Das Kopieren wurde angehalten. Weitermachen kopiert nur, was noch fehlt.", + "Go on copying": "Weiter kopieren", + "Stop copying?": "Kopieren anhalten?", + "What is copied stays on the new drive; going on later copies only the rest.": "Was kopiert ist, bleibt auf dem neuen Laufwerk; später weitermachen kopiert nur den Rest.", + "Switch to the new drive now?": "Jetzt auf das neue Laufwerk umschalten?", + "Shares, apps, downloads and the media server stop for the last copy and start again on the new drive. Open files on the network are closed.": "Freigaben, Apps, Downloads und der Medienserver halten für den letzten Abgleich an und starten auf dem neuen Laufwerk neu. Im Netzwerk geöffnete Dateien werden geschlossen.", + "source and target are the same drive": "Quelle und Ziel sind dasselbe Laufwerk", + "the new drive needs ext4 or btrfs (owners, personal folders, app area)": "das neue Laufwerk braucht ext4 oder Btrfs (Besitzer, persönliche Ordner, App-Bereich)", + "the new drive is not empty – choose an empty drive": "das neue Laufwerk ist nicht leer – wähle ein leeres Laufwerk", + "not enough free space on the new drive": "nicht genug freier Platz auf dem neuen Laufwerk", + "copy failed – see the log; starting again copies only what is missing": "Kopieren fehlgeschlagen – siehe Protokoll; ein neuer Start kopiert nur, was fehlt", + "the last copy before switching failed – nothing was switched": "der letzte Abgleich vor dem Umschalten ist fehlgeschlagen – nichts wurde umgestellt", + "copy everything first": "zuerst alles kopieren", + "a move is already running": "ein Umzug läuft bereits" }, "patterns": [ [ @@ -2126,6 +2167,10 @@ "^personal inbox of (.+) · token (.+)$", "persönlicher Eingang von $1 · Token $2" ], + [ + "^(\\S+ \\S+) · free on the new drive: (\\S+ \\S+)$", + "$1 · frei auf dem neuen Laufwerk: $2" + ], [ "^(\\S+): no longer starts at boot$", "$1: startet nicht mehr beim Einschalten" @@ -2210,6 +2255,10 @@ "^failed (\\S+): ubiupdatevol$", "fehlgeschlagen ($1): das System konnte nicht geschrieben werden (ubiupdatevol)" ], + [ + "^drive (\\S+) is not mounted$", + "Laufwerk $1 ist nicht eingehängt" + ], [ "^shared inbox · token (.+)$", "gemeinsamer Eingang · Token $1" @@ -2486,6 +2535,10 @@ "^(\\S+) downloading …$", "$1 wird geladen …" ], + [ + "^unknown drive (\\S+)$", + "unbekanntes Laufwerk $1" + ], [ "^User “(.+)” saved\\.$", "Benutzer „$1“ gespeichert." diff --git a/src/shareos-core/www/i18n/es.json b/src/shareos-core/www/i18n/es.json index b146ca8d..35d97a32 100644 --- a/src/shareos-core/www/i18n/es.json +++ b/src/shareos-core/www/i18n/es.json @@ -1739,7 +1739,48 @@ "Install from an unsigned source?": "¿Instalar desde una fuente sin firmar?", "This app comes from a store source without a valid signature of the ShareOS project.": "Esta app procede de una fuente de la tienda sin una firma válida del proyecto ShareOS.", "Its checksum only shows that the download is complete – not who made it.": "Su suma de comprobación solo muestra que la descarga está completa, no quién la hizo.", - "catalog signature missing or invalid – not used": "falta la firma del catálogo o no es válida – no se usa" + "catalog signature missing or invalid – not used": "falta la firma del catálogo o no es válida – no se usa", + "MOVE TO A NEW DRIVE": "MOVER A UNA UNIDAD NUEVA", + "DISK CHANGE": "CAMBIO DE DISCO", + "Copies everything from an old drive to a new one – shares, personal folders and the app area – and then switches over, so that nothing has to be set up again.": "Copia todo de una unidad antigua a una nueva – recursos compartidos, carpetas personales y el área de apps – y luego cambia, sin tener que configurar nada de nuevo.", + "1 · CHOOSE THE DRIVES": "1 · ELEGIR LAS UNIDADES", + "OLD DRIVE (FROM)": "UNIDAD ANTIGUA (DESDE)", + "NEW DRIVE (TO)": "UNIDAD NUEVA (HACIA)", + "The new drive must be set up and empty, with ext4 or Btrfs. It can be in the second bay or in a USB case – after the move it can go into a bay. Set it up first under": "La unidad nueva debe estar configurada y vacía, con ext4 o Btrfs. Puede estar en la segunda bahía o en una caja USB; tras el traslado puede ir a una bahía. Configúrala primero en", + "An old disk in a USB case is added there without erasing it (a disk with data).": "Un disco antiguo en una caja USB se añade allí sin borrarlo (disco con datos).", + "Personal folders": "Carpetas personales", + "Snapshot jobs": "Tareas de instantáneas", + "Data": "Datos", + "moves along": "se mueve también", + "Everything on the old drive is copied – also folders that are not shared – except the snapshots. Owners, permissions and ACLs stay. The old drive is not changed.": "Se copia todo lo de la unidad antigua – también carpetas no compartidas – excepto las instantáneas. Propietarios, permisos y ACL se mantienen. La unidad antigua no se modifica.", + "Check": "Comprobar", + "Start copying": "Empezar a copiar", + "2 · COPYING": "2 · COPIANDO", + "3 · SWITCHING": "3 · CAMBIANDO", + "3 · SWITCH": "3 · CAMBIAR", + "Services are stopped for the last copy – shares are back in a moment.": "Los servicios están detenidos para la última copia; los recursos compartidos vuelven en un momento.", + "The box can be used while it copies. What changes until the switch is copied then.": "La caja se puede usar mientras copia. Lo que cambie hasta el cambio se copia entonces.", + "Everything is copied.": "Todo está copiado.", + "Switching stops shares, apps, downloads and the media server for a short time, copies what changed since and then points shares, personal folders, the app area, the USB copy and snapshot jobs to the new drive.": "El cambio detiene brevemente recursos compartidos, apps, descargas y el servidor multimedia, copia lo que cambió desde entonces y luego apunta recursos compartidos, carpetas personales, área de apps, copia USB y tareas de instantáneas a la unidad nueva.", + "Switch now": "Cambiar ahora", + "DONE": "HECHO", + "Shares, personal folders and the app area are now on the new drive.": "Los recursos compartidos, las carpetas personales y el área de apps están ahora en la unidad nueva.", + "The old drive is unchanged. When everything works, forget it under": "La unidad antigua no ha cambiado. Cuando todo funcione, olvídala en", + "and take the disk out – or keep it as a backup.": "y saca el disco, o guárdalo como copia de seguridad.", + "The copy was stopped. Going on copies only what is missing.": "La copia se detuvo. Continuar copia solo lo que falta.", + "Go on copying": "Seguir copiando", + "Stop copying?": "¿Detener la copia?", + "What is copied stays on the new drive; going on later copies only the rest.": "Lo copiado se queda en la unidad nueva; continuar más tarde copia solo el resto.", + "Switch to the new drive now?": "¿Cambiar ahora a la unidad nueva?", + "Shares, apps, downloads and the media server stop for the last copy and start again on the new drive. Open files on the network are closed.": "Recursos compartidos, apps, descargas y el servidor multimedia se detienen para la última copia y vuelven a arrancar en la unidad nueva. Los archivos abiertos en la red se cierran.", + "source and target are the same drive": "el origen y el destino son la misma unidad", + "the new drive needs ext4 or btrfs (owners, personal folders, app area)": "la unidad nueva necesita ext4 o btrfs (propietarios, carpetas personales, área de apps)", + "the new drive is not empty – choose an empty drive": "la unidad nueva no está vacía: elige una unidad vacía", + "not enough free space on the new drive": "no hay suficiente espacio libre en la unidad nueva", + "copy failed – see the log; starting again copies only what is missing": "la copia falló: mira el registro; volver a empezar copia solo lo que falta", + "the last copy before switching failed – nothing was switched": "la última copia antes del cambio falló: no se cambió nada", + "copy everything first": "copia todo primero", + "a move is already running": "ya hay un traslado en curso" }, "patterns": [ [ @@ -2126,6 +2167,10 @@ "^personal inbox of (.+) · token (.+)$", "entrada personal de $1 · token $2" ], + [ + "^(\\S+ \\S+) · free on the new drive: (\\S+ \\S+)$", + "$1 · libre en la unidad nueva: $2" + ], [ "^(\\S+): no longer starts at boot$", "$1: ya no arranca al encender" @@ -2210,6 +2255,10 @@ "^failed (\\S+): ubiupdatevol$", "falló ($1): no se pudo escribir el sistema (ubiupdatevol)" ], + [ + "^drive (\\S+) is not mounted$", + "la unidad $1 no está montada" + ], [ "^shared inbox · token (.+)$", "bandeja compartida · token $1" @@ -2486,6 +2535,10 @@ "^(\\S+) downloading …$", "$1 descargando …" ], + [ + "^unknown drive (\\S+)$", + "unidad desconocida $1" + ], [ "^User “(.+)” saved\\.$", "Usuario «$1» guardado." diff --git a/src/shareos-core/www/i18n/fr.json b/src/shareos-core/www/i18n/fr.json index 51f23f85..659f67a5 100644 --- a/src/shareos-core/www/i18n/fr.json +++ b/src/shareos-core/www/i18n/fr.json @@ -1739,7 +1739,48 @@ "Install from an unsigned source?": "Installer depuis une source non signée ?", "This app comes from a store source without a valid signature of the ShareOS project.": "Cette application provient d’une source du store sans signature valide du projet ShareOS.", "Its checksum only shows that the download is complete – not who made it.": "Sa somme de contrôle montre seulement que le téléchargement est complet – pas qui l’a créée.", - "catalog signature missing or invalid – not used": "signature du catalogue absente ou invalide – non utilisé" + "catalog signature missing or invalid – not used": "signature du catalogue absente ou invalide – non utilisé", + "MOVE TO A NEW DRIVE": "DÉMÉNAGER VERS UN NOUVEAU DISQUE", + "DISK CHANGE": "CHANGEMENT DE DISQUE", + "Copies everything from an old drive to a new one – shares, personal folders and the app area – and then switches over, so that nothing has to be set up again.": "Copie tout d’un ancien disque vers un nouveau – partages, dossiers personnels et zone des applications – puis bascule, sans rien avoir à reconfigurer.", + "1 · CHOOSE THE DRIVES": "1 · CHOISIR LES DISQUES", + "OLD DRIVE (FROM)": "ANCIEN DISQUE (DEPUIS)", + "NEW DRIVE (TO)": "NOUVEAU DISQUE (VERS)", + "The new drive must be set up and empty, with ext4 or Btrfs. It can be in the second bay or in a USB case – after the move it can go into a bay. Set it up first under": "Le nouveau disque doit être configuré et vide, en ext4 ou Btrfs. Il peut être dans la deuxième baie ou dans un boîtier USB – après le déménagement, il peut aller dans une baie. Configurez-le d’abord sous", + "An old disk in a USB case is added there without erasing it (a disk with data).": "Un ancien disque dans un boîtier USB y est ajouté sans être effacé (disque avec données).", + "Personal folders": "Dossiers personnels", + "Snapshot jobs": "Tâches d’instantanés", + "Data": "Données", + "moves along": "déménage aussi", + "Everything on the old drive is copied – also folders that are not shared – except the snapshots. Owners, permissions and ACLs stay. The old drive is not changed.": "Tout ce qui est sur l’ancien disque est copié – y compris les dossiers non partagés – sauf les instantanés. Propriétaires, droits et ACL sont conservés. L’ancien disque n’est pas modifié.", + "Check": "Vérifier", + "Start copying": "Lancer la copie", + "2 · COPYING": "2 · COPIE", + "3 · SWITCHING": "3 · BASCULEMENT EN COURS", + "3 · SWITCH": "3 · BASCULER", + "Services are stopped for the last copy – shares are back in a moment.": "Les services sont arrêtés pour la dernière copie – les partages reviennent dans un instant.", + "The box can be used while it copies. What changes until the switch is copied then.": "La box reste utilisable pendant la copie. Ce qui change d’ici le basculement est copié à ce moment-là.", + "Everything is copied.": "Tout est copié.", + "Switching stops shares, apps, downloads and the media server for a short time, copies what changed since and then points shares, personal folders, the app area, the USB copy and snapshot jobs to the new drive.": "Le basculement arrête brièvement partages, applications, téléchargements et serveur multimédia, copie ce qui a changé depuis, puis fait pointer partages, dossiers personnels, zone des applications, copie USB et tâches d’instantanés vers le nouveau disque.", + "Switch now": "Basculer maintenant", + "DONE": "TERMINÉ", + "Shares, personal folders and the app area are now on the new drive.": "Les partages, dossiers personnels et la zone des applications sont maintenant sur le nouveau disque.", + "The old drive is unchanged. When everything works, forget it under": "L’ancien disque est inchangé. Quand tout fonctionne, oubliez-le sous", + "and take the disk out – or keep it as a backup.": "et retirez le disque – ou gardez-le comme sauvegarde.", + "The copy was stopped. Going on copies only what is missing.": "La copie a été arrêtée. Reprendre ne copie que ce qui manque.", + "Go on copying": "Reprendre la copie", + "Stop copying?": "Arrêter la copie ?", + "What is copied stays on the new drive; going on later copies only the rest.": "Ce qui est copié reste sur le nouveau disque ; reprendre plus tard ne copie que le reste.", + "Switch to the new drive now?": "Basculer maintenant vers le nouveau disque ?", + "Shares, apps, downloads and the media server stop for the last copy and start again on the new drive. Open files on the network are closed.": "Partages, applications, téléchargements et serveur multimédia s’arrêtent pour la dernière copie et redémarrent sur le nouveau disque. Les fichiers ouverts sur le réseau sont fermés.", + "source and target are the same drive": "la source et la cible sont le même disque", + "the new drive needs ext4 or btrfs (owners, personal folders, app area)": "le nouveau disque doit être en ext4 ou btrfs (propriétaires, dossiers personnels, zone des applications)", + "the new drive is not empty – choose an empty drive": "le nouveau disque n’est pas vide – choisissez un disque vide", + "not enough free space on the new drive": "pas assez d’espace libre sur le nouveau disque", + "copy failed – see the log; starting again copies only what is missing": "échec de la copie – voir le journal ; relancer ne copie que ce qui manque", + "the last copy before switching failed – nothing was switched": "la dernière copie avant le basculement a échoué – rien n’a été basculé", + "copy everything first": "copiez d’abord tout", + "a move is already running": "un déménagement est déjà en cours" }, "patterns": [ [ @@ -2126,6 +2167,10 @@ "^personal inbox of (.+) · token (.+)$", "dossier d’entrée personnel de $1 · jeton $2" ], + [ + "^(\\S+ \\S+) · free on the new drive: (\\S+ \\S+)$", + "$1 · libre sur le nouveau disque : $2" + ], [ "^(\\S+): no longer starts at boot$", "$1 : ne démarre plus au lancement" @@ -2210,6 +2255,10 @@ "^failed (\\S+): ubiupdatevol$", "échec ($1) : le système n'a pas pu être écrit (ubiupdatevol)" ], + [ + "^drive (\\S+) is not mounted$", + "le disque $1 n’est pas monté" + ], [ "^shared inbox · token (.+)$", "boîte partagée · jeton $1" @@ -2486,6 +2535,10 @@ "^(\\S+) downloading …$", "$1 en téléchargement …" ], + [ + "^unknown drive (\\S+)$", + "disque inconnu $1" + ], [ "^User “(.+)” saved\\.$", "Utilisateur « $1 » enregistré." diff --git a/src/shareos-core/www/i18n/hi.json b/src/shareos-core/www/i18n/hi.json index aa28caf8..daf76aae 100644 --- a/src/shareos-core/www/i18n/hi.json +++ b/src/shareos-core/www/i18n/hi.json @@ -1739,7 +1739,48 @@ "Install from an unsigned source?": "बिना हस्ताक्षर वाले स्रोत से इंस्टॉल करें?", "This app comes from a store source without a valid signature of the ShareOS project.": "यह ऐप ऐसे स्टोर स्रोत से है जिस पर ShareOS प्रोजेक्ट का कोई मान्य हस्ताक्षर नहीं है।", "Its checksum only shows that the download is complete – not who made it.": "इसका चेकसम केवल यह दिखाता है कि डाउनलोड पूरा है – यह नहीं कि इसे किसने बनाया।", - "catalog signature missing or invalid – not used": "कैटलॉग हस्ताक्षर नहीं है या अमान्य है – उपयोग नहीं किया गया" + "catalog signature missing or invalid – not used": "कैटलॉग हस्ताक्षर नहीं है या अमान्य है – उपयोग नहीं किया गया", + "MOVE TO A NEW DRIVE": "नई ड्राइव पर ले जाएँ", + "DISK CHANGE": "डिस्क बदलना", + "Copies everything from an old drive to a new one – shares, personal folders and the app area – and then switches over, so that nothing has to be set up again.": "पुरानी ड्राइव से सब कुछ नई ड्राइव पर कॉपी करता है – शेयर, निजी फ़ोल्डर और ऐप क्षेत्र – और फिर उस पर बदल देता है, ताकि कुछ भी दोबारा सेट न करना पड़े।", + "1 · CHOOSE THE DRIVES": "1 · ड्राइव चुनें", + "OLD DRIVE (FROM)": "पुरानी ड्राइव (से)", + "NEW DRIVE (TO)": "नई ड्राइव (तक)", + "The new drive must be set up and empty, with ext4 or Btrfs. It can be in the second bay or in a USB case – after the move it can go into a bay. Set it up first under": "नई ड्राइव सेट अप और खाली होनी चाहिए, ext4 या Btrfs के साथ। वह दूसरे बे में या USB केस में हो सकती है – ले जाने के बाद उसे बे में लगाया जा सकता है। पहले उसे यहाँ सेट अप करें:", + "An old disk in a USB case is added there without erasing it (a disk with data).": "USB केस में पुरानी डिस्क वहाँ बिना मिटाए जोड़ी जाती है (डेटा वाली डिस्क)।", + "Personal folders": "निजी फ़ोल्डर", + "Snapshot jobs": "स्नैपशॉट कार्य", + "Data": "डेटा", + "moves along": "साथ में जाता है", + "Everything on the old drive is copied – also folders that are not shared – except the snapshots. Owners, permissions and ACLs stay. The old drive is not changed.": "पुरानी ड्राइव पर सब कुछ कॉपी होता है – बिना शेयर वाले फ़ोल्डर भी – स्नैपशॉट को छोड़कर। मालिक, अनुमतियाँ और ACL बने रहते हैं। पुरानी ड्राइव नहीं बदली जाती।", + "Check": "जाँचें", + "Start copying": "कॉपी करना शुरू करें", + "2 · COPYING": "2 · कॉपी हो रहा है", + "3 · SWITCHING": "3 · बदला जा रहा है", + "3 · SWITCH": "3 · बदलें", + "Services are stopped for the last copy – shares are back in a moment.": "आख़िरी कॉपी के लिए सेवाएँ रुकी हैं – शेयर कुछ ही पल में लौट आएँगे।", + "The box can be used while it copies. What changes until the switch is copied then.": "कॉपी होते समय बॉक्स का उपयोग किया जा सकता है। बदलने तक जो बदलता है, वह तब कॉपी होता है।", + "Everything is copied.": "सब कुछ कॉपी हो गया।", + "Switching stops shares, apps, downloads and the media server for a short time, copies what changed since and then points shares, personal folders, the app area, the USB copy and snapshot jobs to the new drive.": "बदलने पर शेयर, ऐप, डाउनलोड और मीडिया सर्वर थोड़ी देर रुकते हैं, तब से जो बदला वह कॉपी होता है, फिर शेयर, निजी फ़ोल्डर, ऐप क्षेत्र, USB कॉपी और स्नैपशॉट कार्य नई ड्राइव की ओर हो जाते हैं।", + "Switch now": "अभी बदलें", + "DONE": "पूरा", + "Shares, personal folders and the app area are now on the new drive.": "शेयर, निजी फ़ोल्डर और ऐप क्षेत्र अब नई ड्राइव पर हैं।", + "The old drive is unchanged. When everything works, forget it under": "पुरानी ड्राइव अपरिवर्तित है। सब ठीक चलने पर उसे यहाँ भूल जाएँ:", + "and take the disk out – or keep it as a backup.": "और डिस्क निकाल लें – या उसे बैकअप के रूप में रखें।", + "The copy was stopped. Going on copies only what is missing.": "कॉपी रोकी गई। जारी रखने पर केवल जो बचा है वही कॉपी होगा।", + "Go on copying": "कॉपी जारी रखें", + "Stop copying?": "कॉपी रोकें?", + "What is copied stays on the new drive; going on later copies only the rest.": "जो कॉपी हो चुका है वह नई ड्राइव पर रहता है; बाद में जारी रखने पर केवल बाकी कॉपी होगा।", + "Switch to the new drive now?": "अभी नई ड्राइव पर बदलें?", + "Shares, apps, downloads and the media server stop for the last copy and start again on the new drive. Open files on the network are closed.": "आख़िरी कॉपी के लिए शेयर, ऐप, डाउनलोड और मीडिया सर्वर रुकते हैं और नई ड्राइव पर फिर से शुरू होते हैं। नेटवर्क पर खुली फ़ाइलें बंद हो जाती हैं।", + "source and target are the same drive": "स्रोत और लक्ष्य एक ही ड्राइव हैं", + "the new drive needs ext4 or btrfs (owners, personal folders, app area)": "नई ड्राइव को ext4 या btrfs चाहिए (मालिक, निजी फ़ोल्डर, ऐप क्षेत्र)", + "the new drive is not empty – choose an empty drive": "नई ड्राइव खाली नहीं है – कोई खाली ड्राइव चुनें", + "not enough free space on the new drive": "नई ड्राइव पर पर्याप्त खाली जगह नहीं है", + "copy failed – see the log; starting again copies only what is missing": "कॉपी विफल – लॉग देखें; दोबारा शुरू करने पर केवल बचा हुआ कॉपी होगा", + "the last copy before switching failed – nothing was switched": "बदलने से पहले की आख़िरी कॉपी विफल रही – कुछ नहीं बदला गया", + "copy everything first": "पहले सब कुछ कॉपी करें", + "a move is already running": "एक स्थानांतरण पहले से चल रहा है" }, "patterns": [ [ @@ -2126,6 +2167,10 @@ "^personal inbox of (.+) · token (.+)$", "$1 का निजी इनबॉक्स · टोकन $2" ], + [ + "^(\\S+ \\S+) · free on the new drive: (\\S+ \\S+)$", + "$1 · नई ड्राइव पर खाली: $2" + ], [ "^(\\S+): no longer starts at boot$", "$1: शुरुआत पर अब चालू नहीं होती" @@ -2210,6 +2255,10 @@ "^failed (\\S+): ubiupdatevol$", "विफल ($1): सिस्टम लिखा नहीं जा सका (ubiupdatevol)" ], + [ + "^drive (\\S+) is not mounted$", + "ड्राइव $1 माउंट नहीं है" + ], [ "^shared inbox · token (.+)$", "साझा इनबॉक्स · टोकन $1" @@ -2486,6 +2535,10 @@ "^(\\S+) downloading …$", "$1 डाउनलोड हो रहा है …" ], + [ + "^unknown drive (\\S+)$", + "अज्ञात ड्राइव $1" + ], [ "^User “(.+)” saved\\.$", "उपयोगकर्ता \"$1\" सहेजा गया।" diff --git a/src/shareos-core/www/i18n/pt.json b/src/shareos-core/www/i18n/pt.json index 8ba09538..a0bcdf74 100644 --- a/src/shareos-core/www/i18n/pt.json +++ b/src/shareos-core/www/i18n/pt.json @@ -1739,7 +1739,48 @@ "Install from an unsigned source?": "Instalar a partir de uma fonte não assinada?", "This app comes from a store source without a valid signature of the ShareOS project.": "Esta app vem de uma fonte da loja sem uma assinatura válida do projeto ShareOS.", "Its checksum only shows that the download is complete – not who made it.": "A sua soma de verificação só mostra que a transferência está completa – não quem a fez.", - "catalog signature missing or invalid – not used": "assinatura do catálogo em falta ou inválida – não usado" + "catalog signature missing or invalid – not used": "assinatura do catálogo em falta ou inválida – não usado", + "MOVE TO A NEW DRIVE": "MOVER PARA UMA NOVA UNIDADE", + "DISK CHANGE": "TROCA DE DISCO", + "Copies everything from an old drive to a new one – shares, personal folders and the app area – and then switches over, so that nothing has to be set up again.": "Copia tudo de uma unidade antiga para uma nova – partilhas, pastas pessoais e a área de apps – e depois muda, sem ter de configurar nada de novo.", + "1 · CHOOSE THE DRIVES": "1 · ESCOLHER AS UNIDADES", + "OLD DRIVE (FROM)": "UNIDADE ANTIGA (DE)", + "NEW DRIVE (TO)": "NOVA UNIDADE (PARA)", + "The new drive must be set up and empty, with ext4 or Btrfs. It can be in the second bay or in a USB case – after the move it can go into a bay. Set it up first under": "A nova unidade tem de estar configurada e vazia, com ext4 ou Btrfs. Pode estar no segundo compartimento ou numa caixa USB – depois da mudança pode ir para um compartimento. Configure-a primeiro em", + "An old disk in a USB case is added there without erasing it (a disk with data).": "Um disco antigo numa caixa USB é adicionado aí sem ser apagado (disco com dados).", + "Personal folders": "Pastas pessoais", + "Snapshot jobs": "Tarefas de instantâneos", + "Data": "Dados", + "moves along": "muda também", + "Everything on the old drive is copied – also folders that are not shared – except the snapshots. Owners, permissions and ACLs stay. The old drive is not changed.": "Tudo o que está na unidade antiga é copiado – também pastas não partilhadas – exceto os instantâneos. Donos, permissões e ACL mantêm-se. A unidade antiga não é alterada.", + "Check": "Verificar", + "Start copying": "Começar a copiar", + "2 · COPYING": "2 · A COPIAR", + "3 · SWITCHING": "3 · A MUDAR", + "3 · SWITCH": "3 · MUDAR", + "Services are stopped for the last copy – shares are back in a moment.": "Os serviços estão parados para a última cópia – as partilhas voltam dentro de momentos.", + "The box can be used while it copies. What changes until the switch is copied then.": "A caixa pode ser usada enquanto copia. O que mudar até à mudança é copiado nessa altura.", + "Everything is copied.": "Tudo está copiado.", + "Switching stops shares, apps, downloads and the media server for a short time, copies what changed since and then points shares, personal folders, the app area, the USB copy and snapshot jobs to the new drive.": "A mudança para brevemente partilhas, apps, transferências e o servidor multimédia, copia o que mudou desde então e depois aponta partilhas, pastas pessoais, área de apps, cópia USB e tarefas de instantâneos para a nova unidade.", + "Switch now": "Mudar agora", + "DONE": "CONCLUÍDO", + "Shares, personal folders and the app area are now on the new drive.": "As partilhas, pastas pessoais e a área de apps estão agora na nova unidade.", + "The old drive is unchanged. When everything works, forget it under": "A unidade antiga está inalterada. Quando tudo funcionar, esqueça-a em", + "and take the disk out – or keep it as a backup.": "e retire o disco – ou guarde-o como cópia de segurança.", + "The copy was stopped. Going on copies only what is missing.": "A cópia foi parada. Continuar copia apenas o que falta.", + "Go on copying": "Continuar a copiar", + "Stop copying?": "Parar a cópia?", + "What is copied stays on the new drive; going on later copies only the rest.": "O que foi copiado fica na nova unidade; continuar mais tarde copia só o resto.", + "Switch to the new drive now?": "Mudar agora para a nova unidade?", + "Shares, apps, downloads and the media server stop for the last copy and start again on the new drive. Open files on the network are closed.": "Partilhas, apps, transferências e o servidor multimédia param para a última cópia e arrancam de novo na nova unidade. Os ficheiros abertos na rede são fechados.", + "source and target are the same drive": "a origem e o destino são a mesma unidade", + "the new drive needs ext4 or btrfs (owners, personal folders, app area)": "a nova unidade precisa de ext4 ou btrfs (donos, pastas pessoais, área de apps)", + "the new drive is not empty – choose an empty drive": "a nova unidade não está vazia – escolha uma unidade vazia", + "not enough free space on the new drive": "não há espaço livre suficiente na nova unidade", + "copy failed – see the log; starting again copies only what is missing": "a cópia falhou – veja o registo; recomeçar copia só o que falta", + "the last copy before switching failed – nothing was switched": "a última cópia antes da mudança falhou – nada foi mudado", + "copy everything first": "copie tudo primeiro", + "a move is already running": "já está a decorrer uma mudança" }, "patterns": [ [ @@ -2126,6 +2167,10 @@ "^personal inbox of (.+) · token (.+)$", "entrada pessoal de $1 · token $2" ], + [ + "^(\\S+ \\S+) · free on the new drive: (\\S+ \\S+)$", + "$1 · livre na nova unidade: $2" + ], [ "^(\\S+): no longer starts at boot$", "$1: não inicia mais ao ligar" @@ -2210,6 +2255,10 @@ "^failed (\\S+): ubiupdatevol$", "falhou ($1): não foi possível gravar o sistema (ubiupdatevol)" ], + [ + "^drive (\\S+) is not mounted$", + "a unidade $1 não está montada" + ], [ "^shared inbox · token (.+)$", "caixa compartilhada · token $1" @@ -2486,6 +2535,10 @@ "^(\\S+) downloading …$", "$1 baixando …" ], + [ + "^unknown drive (\\S+)$", + "unidade desconhecida $1" + ], [ "^User “(.+)” saved\\.$", "Usuário \"$1\" salvo." diff --git a/src/shareos-core/www/i18n/ru.json b/src/shareos-core/www/i18n/ru.json index 6f01a6b5..279fb440 100644 --- a/src/shareos-core/www/i18n/ru.json +++ b/src/shareos-core/www/i18n/ru.json @@ -1739,7 +1739,48 @@ "Install from an unsigned source?": "Установить из неподписанного источника?", "This app comes from a store source without a valid signature of the ShareOS project.": "Это приложение получено из источника магазина без действительной подписи проекта ShareOS.", "Its checksum only shows that the download is complete – not who made it.": "Его контрольная сумма показывает лишь, что загрузка завершена, но не то, кто его создал.", - "catalog signature missing or invalid – not used": "подпись каталога отсутствует или недействительна – не используется" + "catalog signature missing or invalid – not used": "подпись каталога отсутствует или недействительна – не используется", + "MOVE TO A NEW DRIVE": "ПЕРЕНОС НА НОВЫЙ ДИСК", + "DISK CHANGE": "ЗАМЕНА ДИСКА", + "Copies everything from an old drive to a new one – shares, personal folders and the app area – and then switches over, so that nothing has to be set up again.": "Копирует всё со старого диска на новый – общие папки, личные папки и область приложений – и затем переключается, так что ничего не нужно настраивать заново.", + "1 · CHOOSE THE DRIVES": "1 · ВЫБОР ДИСКОВ", + "OLD DRIVE (FROM)": "СТАРЫЙ ДИСК (ОТКУДА)", + "NEW DRIVE (TO)": "НОВЫЙ ДИСК (КУДА)", + "The new drive must be set up and empty, with ext4 or Btrfs. It can be in the second bay or in a USB case – after the move it can go into a bay. Set it up first under": "Новый диск должен быть настроен и пуст, с ext4 или Btrfs. Он может стоять во втором отсеке или в USB-корпусе – после переноса его можно поставить в отсек. Сначала настройте его в разделе", + "An old disk in a USB case is added there without erasing it (a disk with data).": "Старый диск в USB-корпусе добавляется там без стирания (диск с данными).", + "Personal folders": "Личные папки", + "Snapshot jobs": "Задания снимков", + "Data": "Данные", + "moves along": "переносится тоже", + "Everything on the old drive is copied – also folders that are not shared – except the snapshots. Owners, permissions and ACLs stay. The old drive is not changed.": "Копируется всё со старого диска – и папки без общего доступа – кроме снимков. Владельцы, права и ACL сохраняются. Старый диск не изменяется.", + "Check": "Проверить", + "Start copying": "Начать копирование", + "2 · COPYING": "2 · КОПИРОВАНИЕ", + "3 · SWITCHING": "3 · ПЕРЕКЛЮЧЕНИЕ", + "3 · SWITCH": "3 · ПЕРЕКЛЮЧИТЬ", + "Services are stopped for the last copy – shares are back in a moment.": "Службы остановлены для последнего копирования – общие папки сейчас вернутся.", + "The box can be used while it copies. What changes until the switch is copied then.": "Устройством можно пользоваться во время копирования. Изменения до переключения скопируются тогда.", + "Everything is copied.": "Всё скопировано.", + "Switching stops shares, apps, downloads and the media server for a short time, copies what changed since and then points shares, personal folders, the app area, the USB copy and snapshot jobs to the new drive.": "Переключение ненадолго останавливает общие папки, приложения, загрузки и медиасервер, копирует изменения и затем направляет общие папки, личные папки, область приложений, USB-копирование и задания снимков на новый диск.", + "Switch now": "Переключить сейчас", + "DONE": "ГОТОВО", + "Shares, personal folders and the app area are now on the new drive.": "Общие папки, личные папки и область приложений теперь на новом диске.", + "The old drive is unchanged. When everything works, forget it under": "Старый диск не изменён. Когда всё работает, забудьте его в разделе", + "and take the disk out – or keep it as a backup.": "и извлеките диск – или оставьте его как резервную копию.", + "The copy was stopped. Going on copies only what is missing.": "Копирование остановлено. Продолжение скопирует только недостающее.", + "Go on copying": "Продолжить копирование", + "Stop copying?": "Остановить копирование?", + "What is copied stays on the new drive; going on later copies only the rest.": "Скопированное остаётся на новом диске; позже будет скопирован только остаток.", + "Switch to the new drive now?": "Переключиться на новый диск сейчас?", + "Shares, apps, downloads and the media server stop for the last copy and start again on the new drive. Open files on the network are closed.": "Общие папки, приложения, загрузки и медиасервер остановятся для последнего копирования и снова запустятся на новом диске. Открытые по сети файлы будут закрыты.", + "source and target are the same drive": "источник и цель – один и тот же диск", + "the new drive needs ext4 or btrfs (owners, personal folders, app area)": "новому диску нужен ext4 или btrfs (владельцы, личные папки, область приложений)", + "the new drive is not empty – choose an empty drive": "новый диск не пуст – выберите пустой диск", + "not enough free space on the new drive": "недостаточно свободного места на новом диске", + "copy failed – see the log; starting again copies only what is missing": "копирование не удалось – см. журнал; повторный запуск скопирует только недостающее", + "the last copy before switching failed – nothing was switched": "последнее копирование перед переключением не удалось – ничего не переключено", + "copy everything first": "сначала скопируйте всё", + "a move is already running": "перенос уже выполняется" }, "patterns": [ [ @@ -2126,6 +2167,10 @@ "^personal inbox of (.+) · token (.+)$", "личная входящая папка $1 · токен $2" ], + [ + "^(\\S+ \\S+) · free on the new drive: (\\S+ \\S+)$", + "$1 · свободно на новом диске: $2" + ], [ "^(\\S+): no longer starts at boot$", "$1: больше не запускается при включении" @@ -2210,6 +2255,10 @@ "^failed (\\S+): ubiupdatevol$", "сбой ($1): не удалось записать систему (ubiupdatevol)" ], + [ + "^drive (\\S+) is not mounted$", + "диск $1 не подключён" + ], [ "^shared inbox · token (.+)$", "общая папка входящих · токен $1" @@ -2486,6 +2535,10 @@ "^(\\S+) downloading …$", "$1 загружается …" ], + [ + "^unknown drive (\\S+)$", + "неизвестный диск $1" + ], [ "^User “(.+)” saved\\.$", "Пользователь «$1» сохранён." diff --git a/src/shareos-core/www/i18n/zh.json b/src/shareos-core/www/i18n/zh.json index 2265d48b..c86bf47f 100644 --- a/src/shareos-core/www/i18n/zh.json +++ b/src/shareos-core/www/i18n/zh.json @@ -1739,7 +1739,48 @@ "Install from an unsigned source?": "从未签名的来源安装?", "This app comes from a store source without a valid signature of the ShareOS project.": "此应用来自没有 ShareOS 项目有效签名的商店来源。", "Its checksum only shows that the download is complete – not who made it.": "其校验和只表明下载完整,并不能说明是谁制作的。", - "catalog signature missing or invalid – not used": "目录签名缺失或无效——未使用" + "catalog signature missing or invalid – not used": "目录签名缺失或无效——未使用", + "MOVE TO A NEW DRIVE": "迁移到新驱动器", + "DISK CHANGE": "更换磁盘", + "Copies everything from an old drive to a new one – shares, personal folders and the app area – and then switches over, so that nothing has to be set up again.": "将旧驱动器上的所有内容(共享、个人文件夹和应用区域)复制到新驱动器,然后切换过去,无需重新设置任何内容。", + "1 · CHOOSE THE DRIVES": "1 · 选择驱动器", + "OLD DRIVE (FROM)": "旧驱动器(源)", + "NEW DRIVE (TO)": "新驱动器(目标)", + "The new drive must be set up and empty, with ext4 or Btrfs. It can be in the second bay or in a USB case – after the move it can go into a bay. Set it up first under": "新驱动器必须已设置且为空,文件系统为 ext4 或 Btrfs。它可以在第二个盘位或 USB 硬盘盒中——迁移后可放入盘位。请先在以下位置设置:", + "An old disk in a USB case is added there without erasing it (a disk with data).": "USB 硬盘盒中的旧磁盘可在那里添加且不会被清除(带数据的磁盘)。", + "Personal folders": "个人文件夹", + "Snapshot jobs": "快照任务", + "Data": "数据", + "moves along": "一起迁移", + "Everything on the old drive is copied – also folders that are not shared – except the snapshots. Owners, permissions and ACLs stay. The old drive is not changed.": "旧驱动器上的所有内容都会被复制(包括未共享的文件夹),快照除外。所有者、权限和 ACL 保持不变。旧驱动器不会被更改。", + "Check": "检查", + "Start copying": "开始复制", + "2 · COPYING": "2 · 复制中", + "3 · SWITCHING": "3 · 切换中", + "3 · SWITCH": "3 · 切换", + "Services are stopped for the last copy – shares are back in a moment.": "服务已为最后一次复制而停止——共享很快就会恢复。", + "The box can be used while it copies. What changes until the switch is copied then.": "复制期间仍可使用设备。切换前发生的更改会在切换时复制。", + "Everything is copied.": "全部复制完成。", + "Switching stops shares, apps, downloads and the media server for a short time, copies what changed since and then points shares, personal folders, the app area, the USB copy and snapshot jobs to the new drive.": "切换会短暂停止共享、应用、下载和媒体服务器,复制此后的更改,然后将共享、个人文件夹、应用区域、USB 复制和快照任务指向新驱动器。", + "Switch now": "立即切换", + "DONE": "完成", + "Shares, personal folders and the app area are now on the new drive.": "共享、个人文件夹和应用区域现在位于新驱动器上。", + "The old drive is unchanged. When everything works, forget it under": "旧驱动器未更改。一切正常后,请在以下位置将其移除:", + "and take the disk out – or keep it as a backup.": "然后取出磁盘——或将其保留作为备份。", + "The copy was stopped. Going on copies only what is missing.": "复制已停止。继续时只会复制缺少的部分。", + "Go on copying": "继续复制", + "Stop copying?": "停止复制?", + "What is copied stays on the new drive; going on later copies only the rest.": "已复制的内容保留在新驱动器上;稍后继续只会复制剩余部分。", + "Switch to the new drive now?": "现在切换到新驱动器?", + "Shares, apps, downloads and the media server stop for the last copy and start again on the new drive. Open files on the network are closed.": "共享、应用、下载和媒体服务器会为最后一次复制而停止,并在新驱动器上重新启动。网络上打开的文件会被关闭。", + "source and target are the same drive": "源和目标是同一个驱动器", + "the new drive needs ext4 or btrfs (owners, personal folders, app area)": "新驱动器需要 ext4 或 btrfs(所有者、个人文件夹、应用区域)", + "the new drive is not empty – choose an empty drive": "新驱动器不是空的——请选择一个空驱动器", + "not enough free space on the new drive": "新驱动器上的可用空间不足", + "copy failed – see the log; starting again copies only what is missing": "复制失败——请查看日志;重新开始只会复制缺少的部分", + "the last copy before switching failed – nothing was switched": "切换前的最后一次复制失败——未进行任何切换", + "copy everything first": "请先复制全部内容", + "a move is already running": "迁移已在进行中" }, "patterns": [ [ @@ -2126,6 +2167,10 @@ "^personal inbox of (.+) · token (.+)$", "$1 的个人收件夹 · 令牌 $2" ], + [ + "^(\\S+ \\S+) · free on the new drive: (\\S+ \\S+)$", + "$1 · 新驱动器可用:$2" + ], [ "^(\\S+): no longer starts at boot$", "$1:开机时不再启动" @@ -2210,6 +2255,10 @@ "^failed (\\S+): ubiupdatevol$", "失败($1):无法写入系统(ubiupdatevol)" ], + [ + "^drive (\\S+) is not mounted$", + "驱动器 $1 未挂载" + ], [ "^shared inbox · token (.+)$", "共享收件箱 · 令牌 $1" @@ -2486,6 +2535,10 @@ "^(\\S+) downloading …$", "$1 下载中 …" ], + [ + "^unknown drive (\\S+)$", + "未知驱动器 $1" + ], [ "^User “(.+)” saved\\.$", "用户“$1”已保存。" diff --git a/tests/mock-ubus.py b/tests/mock-ubus.py index e6f0c4c8..09bf807f 100644 --- a/tests/mock-ubus.py +++ b/tests/mock-ubus.py @@ -118,7 +118,9 @@ def storage(): {'name': 'md0', 'state': 'active', 'level': 'raid1', 'members': ['sdb2', 'sda2'], 'disks': 2, 'active': 2, 'health': 'UU', 'sync': {'action': 'recovery' if STATE.get('repair_t') else 'resync', 'percent': pct, 'finish': '412.5min'}}}, 'volumes': [{'name': 'data', 'uuid': '1b4e28ba-2fa1-11d2-883f-0016d3cca427', 'fstype': 'ext4', 'layout': 'mirror', 'enabled': True, - 'device': '/dev/md0', 'mountpoint': '/mnt/data', 'mounted': True, 'size': 3936 << 30, 'used': 1210 << 30, 'avail': 2726 << 30}], + 'device': '/dev/md0', 'mountpoint': '/mnt/data', 'mounted': True, 'size': 3936 << 30, 'used': 1210 << 30, 'avail': 2726 << 30}] + + ([{'name': 'new', 'uuid': '9c1d', 'fstype': 'ext4', 'layout': 'single', 'enabled': True, 'device': '/dev/sdc2', + 'mountpoint': '/mnt/new', 'mounted': True, 'size': 3700 << 30, 'used': 0, 'avail': 3600 << 30}] if os.environ.get('MOCK_NEW_DRIVE') else []), 'spindown': 20, 'smart_schedule': STATE.get('smart_schedule', ''), 'job': STATE['job'], 'usb_copy': STATE.setdefault('usb_copy', {'enabled': False, 'volume': '', 'path': mock_folder('usb'), 'last': None})} @@ -627,6 +629,36 @@ def call(obj, method, args): if method == 'rescan': d['scanning'] = True return d + if obj == 'shareos.migrate': + # disk change: a copy that advances with every state call, a switch that is done at once + mg = STATE.setdefault('mig', {'state': 'none'}) + if method == 'plan': + if args.get('from') == args.get('to'): + return {'from': args['from'], 'to': args['to'], 'shares': [], 'homes': [], 'apps': False, 'snapshot_jobs': [], + 'used': 0, 'free': 0, 'ok': False, 'problem': 'source and target are the same drive'} + return {'from': args['from'], 'to': args['to'], 'shares': ['photos', 'media'], 'homes': ['jan', 'anna'], 'apps': True, + 'snapshot_jobs': [], 'used': 1210 << 30, 'free': 3600 << 30, 'ok': True, 'problem': ''} + if method == 'copy': + STATE['mig'] = {'state': 'copying', 'from': args['from'], 'to': args['to'], 'total': 1210 << 30, 'done': 0, 'percent': 0, 'started': int(time.time()), 'error': ''} + return {'ok': True} + if method == 'state': + if mg['state'] == 'copying': + mg['percent'] = min(100, mg['percent'] + 35) + mg['done'] = mg['total'] * mg['percent'] // 100 + if mg['percent'] >= 100: + mg['state'] = 'copied' + elif mg['state'] == 'switching': + mg['state'] = 'done' + return mg + if method == 'cancel': + mg['state'] = 'cancelled' + return {'ok': True} + if method == 'switch': + mg['state'] = 'switching' + return {'started': True} + if method == 'clear': + STATE['mig'] = {'state': 'none'} + return {'ok': True} if obj == 'shareos.snapshots': sn = STATE.setdefault('snap', {'photos': { 'name': 'photos', 'source': 'share:photos', 'target': 'usb', 'every': 'day', 'time': '03:15', 'exclude': ['*.tmp'], 'enabled': True, diff --git a/tests/test-migrate.sh b/tests/test-migrate.sh new file mode 100755 index 00000000..d0a5ed9e --- /dev/null +++ b/tests/test-migrate.sh @@ -0,0 +1,111 @@ +#!/bin/sh +# Disk change wizard: shareos-migrate (plan, copy, cancel, resume, switch) on +# the host with two folders as drives. +# tests/test-migrate.sh +# Needs rsync; ACLs are checked when setfacl works on the temp folder. +set -u +TOP=$(cd "$(dirname "$0")/.." && pwd) +MIG=$TOP/src/shareos-core/usr/sbin/shareos-migrate +UCI=${1:?usage: test-migrate.sh } +T=$(mktemp -d /tmp/shareos-migrate-test.XXXX) +R=$T/root +pass=0; failed=0 +check() { if eval "$2"; then echo "PASS $1"; pass=$((pass + 1)); else echo "FAIL $1"; failed=$((failed + 1)); fi; } +js() { python3 -c "import json,sys; d=json.load(sys.stdin); sys.exit(0 if ($1) else 1)"; } + +mkdir -p "$T/bin" "$R/etc/config" "$R/etc/init.d" "$R/mnt/old/lost+found" "$R/mnt/new/lost+found" "$R/mnt/other" +ln -s "$UCI" "$T/bin/uci" +printf '#!/bin/sh\n' > "$T/bin/logger"; chmod +x "$T/bin/logger" +for s in S51apps S52tremote S70shares S90services; do + printf '#!/bin/sh\necho "%s $1" >> %s/calls\n' "$s" "$T" > "$R/etc/init.d/$s"; chmod +x "$R/etc/init.d/$s" +done +cat > "$R/etc/config/storage" <<'EOF' +config global 'global' + option apps 'old' +config volume 'old' +config volume 'new' +config volume 'other' +EOF +cat > "$R/etc/config/shares" <<'EOF' +config share 'photos' + option volume 'old' + option path 'Photos' +config share 'music' + option volume 'other' + option path 'Music' +EOF +cat > "$R/etc/config/accounts" <<'EOF' +config user 'jan' + option home 'old' +config user 'anna' + option home 'other' +config user 'tv' +EOF +cat > "$R/etc/config/snapshots" <<'EOF' +config job 'daily' + option target 'old' +EOF +cat > "$R/etc/config/shareos" <<'EOF' +config usbcopy 'usbcopy' + option volume 'old' +EOF +mkdir -p "$R/mnt/old/Photos/2026" "$R/mnt/old/home/jan" "$R/mnt/old/.shareos/apps" "$R/mnt/old/Snapshots/daily" "$R/mnt/old/Not shared" +echo pic > "$R/mnt/old/Photos/2026/a.jpg"; echo doc > "$R/mnt/old/home/jan/doc.txt" +echo app > "$R/mnt/old/.shareos/apps/x"; echo snap > "$R/mnt/old/Snapshots/daily/s"; echo lost > "$R/mnt/old/lost+found/l" +echo keep > "$R/mnt/old/Not shared/k"; ln "$R/mnt/old/Photos/2026/a.jpg" "$R/mnt/old/Photos/hardlink.jpg" +chmod 700 "$R/mnt/old/home/jan" +ACL=0; setfacl -m u:12345:rx "$R/mnt/old/Photos" 2>/dev/null && ACL=1 + +m() { env PATH="$T/bin:$PATH" SHAREOS_ROOT="$R" SHAREOS_MIGRATE_TEST=1 SHAREOS_MIGRATE_POLL=0.2 "$@"; } +mig() { m sh "$MIG" "$@"; } +wait_state() { # – up to 20 s + i=0; while [ $i -lt 100 ]; do mig state | js "d['state']=='$1'" && return 0; sleep 0.2; i=$((i + 1)); done; return 1 +} + +# --- plan -------------------------------------------------------------------- +P=$(mig plan old new) +check "plan: shares, personal folders, app area and snapshot jobs of the old drive" "echo '$P' | js \"d['ok'] and d['shares']==['photos'] and d['homes']==['jan'] and d['apps'] and d['snapshot_jobs']==['daily'] and d['used']>0\"" +check "plan: the same drive is refused" "mig plan old old | js \"not d['ok'] and 'same' in d['problem']\"" +check "plan: an unknown drive is refused" "mig plan old nope | js \"not d['ok'] and 'unknown' in d['problem']\"" +check "plan: a drive that is not mounted is refused" "mig plan old gone 2>/dev/null | js \"not d['ok']\"" +echo x > "$R/mnt/other/x" +check "plan: a target that holds data is refused" "mig plan old other | js \"not d['ok'] and 'not empty' in d['problem']\"" +check "plan: FAT/exFAT/NTFS as target is refused" "SHAREOS_MIGRATE_FS=exfat mig plan old new | js \"not d['ok'] and 'ext4' in d['problem']\"" +check "plan: not enough free space is refused" "SHAREOS_MIGRATE_FREE=10 mig plan old new | js \"not d['ok'] and 'space' in d['problem']\"" +check "switch without a copy is refused" "mig switch | grep -q 'copy everything first'" + +# --- copy, cancel, resume ------------------------------------------------------ +# an rsync that hangs: the copy can be cancelled, and nothing keeps running +mkdir -p "$T/slow"; printf '#!/bin/sh\nsleep 60\n' > "$T/slow/rsync"; chmod +x "$T/slow/rsync" +check "copy starts in the background" "env PATH=$T/slow:$T/bin:\$PATH SHAREOS_ROOT=$R SHAREOS_MIGRATE_TEST=1 SHAREOS_MIGRATE_POLL=0.2 sh $MIG copy old new | js \"d['ok']\"" +sleep 0.5 +check "state: copying" "mig state | js \"d['state']=='copying' and d['from']=='old' and d['to']=='new' and d['total']>0\"" +check "a second copy while one runs is refused" "mig copy old new | grep -q 'already running'" +check "cancel stops the copy and its rsync" "mig cancel | js \"d['ok']\" && sleep 0.5 && mig state | js \"d['state']=='cancelled'\" && ! pgrep -f '$T/slow/rsync' >/dev/null" +echo partial > "$R/mnt/new/partial" +check "the new drive notes where its data comes from" "[ \"\$(cat $R/mnt/new/.shareos-migrate-from)\" = old ]" +check "after a restart the plan allows going on into the same drive" "rm -rf $R/tmp/shareos-migrate && mig plan old new | js \"d['ok']\"" +check "after a restart (no state any more) a stopped copy still goes on into the same drive" "rm -rf $R/tmp/shareos-migrate && mig copy old new | js \"d['ok']\" && wait_state copied" +check "another drive with data is still refused as target" "mig plan other new | js \"not d['ok'] and 'not empty' in d['problem']\"" +check "copied: shares, personal folders, app area, folders that are not shared" "cmp -s $R/mnt/old/Photos/2026/a.jpg $R/mnt/new/Photos/2026/a.jpg && [ -f $R/mnt/new/home/jan/doc.txt ] && [ -f $R/mnt/new/.shareos/apps/x ] && [ -f '$R/mnt/new/Not shared/k' ]" +check "not copied: lost+found and Snapshots" "[ ! -e $R/mnt/new/Snapshots ] && [ ! -e $R/mnt/new/lost+found/l ]" +check "rights and hard links are kept" "[ \"\$(stat -c %a $R/mnt/new/home/jan)\" = 700 ] && [ \"\$(stat -c %i $R/mnt/new/Photos/hardlink.jpg)\" = \"\$(stat -c %i $R/mnt/new/Photos/2026/a.jpg)\" ]" +[ $ACL = 1 ] && check "ACLs are kept" "getfacl -n $R/mnt/new/Photos 2>/dev/null | grep -q 'user:12345:r-x'" +check "state: copied, 100 %" "mig state | js \"d['state']=='copied' and d['percent']==100\"" +check "nothing was switched yet" "[ \"\$($UCI -c $R/etc/config get shares.photos.volume)\" = old ]" + +# --- switch -------------------------------------------------------------------- +echo new > "$R/mnt/old/Photos/after.jpg"; rm "$R/mnt/old/home/jan/doc.txt" +: > "$T/calls" +check "switch" "mig switch | js \"d['ok']\" && mig state | js \"d['state']=='done'\"" +check "switch: what changed since the copy is there, what was deleted is gone" "[ -f $R/mnt/new/Photos/after.jpg ] && [ ! -e $R/mnt/new/home/jan/doc.txt ] && [ ! -e $R/mnt/new/partial ] && [ ! -e $R/mnt/new/.shareos-migrate-from ]" +g() { "$UCI" -c "$R/etc/config" get "$1"; } +check "switch: shares, personal folders, app area, USB copy and snapshot jobs point to the new drive" "[ \"\$(g shares.photos.volume) \$(g accounts.jan.home) \$(g storage.global.apps) \$(g shareos.usbcopy.volume) \$(g snapshots.daily.target)\" = 'new new new new new' ]" +check "switch: other drives stay as they are" "[ \"\$(g shares.music.volume) \$(g accounts.anna.home)\" = 'other other' ] && ! $UCI -c $R/etc/config -q get accounts.tv.home" +check "switch: services stopped before and started after" "[ \"\$(tr '\\n' ' ' < $T/calls)\" = 'S90services stop S52tremote stop S51apps stop S70shares stop S70shares start S51apps start S52tremote start S90services start ' ]" +check "the old drive is not changed" "[ -f $R/mnt/old/Photos/2026/a.jpg ] && [ -f $R/mnt/old/Snapshots/daily/s ] && [ -f $R/mnt/old/.shareos/apps/x ]" +check "clear forgets the job" "mig clear | js \"d['ok']\" && mig state | js \"d['state']=='none'\"" + +rm -rf "$T" +echo; echo "$pass passed, $failed failed" +[ $failed -eq 0 ] diff --git a/tools/i18n/ar.tsv b/tools/i18n/ar.tsv index 2c72f037..e0027bf7 100644 --- a/tools/i18n/ar.tsv +++ b/tools/i18n/ar.tsv @@ -2197,3 +2197,47 @@ E1753 التثبيت من مصدر غير موقَّع؟ E1754 يأتي هذا التطبيق من مصدر متجر بلا توقيع صالح من مشروع ShareOS. E1755 مجموع التحقق يبيّن فقط أن التنزيل مكتمل – لا من صنعه. E1756 توقيع الكتالوج مفقود أو غير صالح – لم يُستخدم +E1757 النقل إلى محرك جديد +E1758 تبديل القرص +E1759 ينسخ كل شيء من محرك قديم إلى محرك جديد – المشاركات والمجلدات الشخصية ومنطقة التطبيقات – ثم يبدّل إليه، فلا حاجة لإعداد أي شيء من جديد. +E1760 1 · اختيار المحركات +E1761 المحرك القديم (من) +E1762 المحرك الجديد (إلى) +E1763 يجب أن يكون المحرك الجديد مُعدًّا وفارغًا، بنظام ext4 أو Btrfs. يمكن أن يكون في الحجرة الثانية أو في علبة USB – وبعد النقل يمكن وضعه في حجرة. أعدّه أولاً في +E1764 يُضاف هناك القرص القديم في علبة USB دون مسحه (قرص يحتوي على بيانات). +E1765 المجلدات الشخصية +E1766 مهام اللقطات +E1767 البيانات +E1768 يُنقل أيضًا +E1769 يُنسخ كل ما على المحرك القديم – حتى المجلدات غير المشاركة – عدا اللقطات. يبقى المالكون والأذونات وقوائم ACL. لا يتغير المحرك القديم. +E1770 تحقق +E1771 بدء النسخ +E1772 2 · النسخ +E1773 3 · جارٍ التبديل +E1774 3 · التبديل +E1775 الخدمات متوقفة للنسخة الأخيرة – ستعود المشاركات بعد لحظة. +E1776 يمكن استخدام الجهاز أثناء النسخ. ما يتغير حتى التبديل يُنسخ حينها. +E1777 تم نسخ كل شيء. +E1778 يوقف التبديل المشاركات والتطبيقات والتنزيلات وخادم الوسائط لفترة قصيرة، وينسخ ما تغيّر منذ ذلك الحين، ثم يوجّه المشاركات والمجلدات الشخصية ومنطقة التطبيقات ونسخ USB ومهام اللقطات إلى المحرك الجديد. +E1779 بدّل الآن +E1780 تم +E1781 أصبحت المشاركات والمجلدات الشخصية ومنطقة التطبيقات الآن على المحرك الجديد. +E1782 المحرك القديم لم يتغير. عندما يعمل كل شيء، انسَه في +E1783 وأخرج القرص – أو احتفظ به نسخةً احتياطية. +E1784 توقف النسخ. المتابعة تنسخ ما ينقص فقط. +E1785 متابعة النسخ +E1786 إيقاف النسخ؟ +E1787 ما نُسخ يبقى على المحرك الجديد؛ المتابعة لاحقًا تنسخ الباقي فقط. +E1788 التبديل إلى المحرك الجديد الآن؟ +E1789 تتوقف المشاركات والتطبيقات والتنزيلات وخادم الوسائط للنسخة الأخيرة ثم تعمل من جديد على المحرك الجديد. تُغلق الملفات المفتوحة عبر الشبكة. +E1790 المصدر والهدف هما المحرك نفسه +E1791 يحتاج المحرك الجديد إلى ext4 أو btrfs (المالكون، المجلدات الشخصية، منطقة التطبيقات) +E1792 المحرك الجديد ليس فارغًا – اختر محركًا فارغًا +E1793 لا توجد مساحة حرة كافية على المحرك الجديد +E1794 فشل النسخ – راجع السجل؛ البدء من جديد ينسخ ما ينقص فقط +E1795 فشلت النسخة الأخيرة قبل التبديل – لم يُبدَّل شيء +E1796 انسخ كل شيء أولاً +E1797 هناك نقل قيد التشغيل بالفعل +P398 $1 · المساحة الحرة على المحرك الجديد: $2 +P399 محرك غير معروف $1 +P400 المحرك $1 غير موصول diff --git a/tools/i18n/bn.tsv b/tools/i18n/bn.tsv index 609d2196..2bf21ab6 100644 --- a/tools/i18n/bn.tsv +++ b/tools/i18n/bn.tsv @@ -2197,3 +2197,47 @@ E1753 স্বাক্ষরবিহীন উৎস থেকে ইনস E1754 এই অ্যাপটি এমন একটি স্টোর উৎস থেকে এসেছে যাতে ShareOS প্রকল্পের কোনো বৈধ স্বাক্ষর নেই। E1755 এর চেকসাম শুধু দেখায় যে ডাউনলোড সম্পূর্ণ – কে এটি তৈরি করেছে তা নয়। E1756 ক্যাটালগের স্বাক্ষর নেই বা অবৈধ – ব্যবহার করা হয়নি +E1757 নতুন ড্রাইভে সরান +E1758 ডিস্ক বদল +E1759 পুরোনো ড্রাইভ থেকে সবকিছু নতুন ড্রাইভে কপি করে – শেয়ার, ব্যক্তিগত ফোল্ডার ও অ্যাপ এলাকা – তারপর সেখানে বদলে নেয়, যাতে কিছুই আবার সেট আপ করতে না হয়। +E1760 1 · ড্রাইভ বেছে নিন +E1761 পুরোনো ড্রাইভ (থেকে) +E1762 নতুন ড্রাইভ (তে) +E1763 নতুন ড্রাইভটি সেট আপ করা ও খালি হতে হবে, ext4 বা Btrfs সহ। এটি দ্বিতীয় বে-তে বা USB কেসে থাকতে পারে – সরানোর পরে এটি বে-তে লাগানো যায়। প্রথমে এখানে সেট আপ করুন: +E1764 USB কেসের পুরোনো ডিস্ক সেখানে না মুছে যোগ করা হয় (ডেটাসহ ডিস্ক)। +E1765 ব্যক্তিগত ফোল্ডার +E1766 স্ন্যাপশট কাজ +E1767 ডেটা +E1768 সঙ্গে সরে যায় +E1769 পুরোনো ড্রাইভের সবকিছু কপি হয় – শেয়ার না করা ফোল্ডারও – স্ন্যাপশট ছাড়া। মালিক, অনুমতি ও ACL থাকে। পুরোনো ড্রাইভ বদলানো হয় না। +E1770 যাচাই করুন +E1771 কপি শুরু করুন +E1772 2 · কপি হচ্ছে +E1773 3 · বদলানো হচ্ছে +E1774 3 · বদল +E1775 শেষ কপির জন্য সেবাগুলো থেমে আছে – শেয়ার একটু পরেই ফিরে আসবে। +E1776 কপি চলার সময় বক্স ব্যবহার করা যায়। বদলের আগে যা বদলায়, তা তখন কপি হয়। +E1777 সবকিছু কপি হয়েছে। +E1778 বদলের সময় শেয়ার, অ্যাপ, ডাউনলোড ও মিডিয়া সার্ভার অল্প সময় থামে, তারপর থেকে যা বদলেছে তা কপি হয়, তারপর শেয়ার, ব্যক্তিগত ফোল্ডার, অ্যাপ এলাকা, USB কপি ও স্ন্যাপশট কাজ নতুন ড্রাইভে নির্দেশ করে। +E1779 এখনই বদলান +E1780 সম্পন্ন +E1781 শেয়ার, ব্যক্তিগত ফোল্ডার ও অ্যাপ এলাকা এখন নতুন ড্রাইভে। +E1782 পুরোনো ড্রাইভ অপরিবর্তিত। সব ঠিক চললে এটি এখানে ভুলে যান: +E1783 এবং ডিস্কটি খুলে নিন – অথবা ব্যাকআপ হিসেবে রাখুন। +E1784 কপি থামানো হয়েছে। চালিয়ে গেলে শুধু যা বাকি তা কপি হবে। +E1785 কপি চালিয়ে যান +E1786 কপি থামাবেন? +E1787 যা কপি হয়েছে তা নতুন ড্রাইভে থাকে; পরে চালালে শুধু বাকিটা কপি হবে। +E1788 এখনই নতুন ড্রাইভে বদলাবেন? +E1789 শেষ কপির জন্য শেয়ার, অ্যাপ, ডাউনলোড ও মিডিয়া সার্ভার থামে এবং নতুন ড্রাইভে আবার চালু হয়। নেটওয়ার্কে খোলা ফাইল বন্ধ হয়ে যায়। +E1790 উৎস ও লক্ষ্য একই ড্রাইভ +E1791 নতুন ড্রাইভে ext4 বা btrfs লাগবে (মালিক, ব্যক্তিগত ফোল্ডার, অ্যাপ এলাকা) +E1792 নতুন ড্রাইভ খালি নয় – একটি খালি ড্রাইভ বেছে নিন +E1793 নতুন ড্রাইভে যথেষ্ট খালি জায়গা নেই +E1794 কপি ব্যর্থ – লগ দেখুন; আবার শুরু করলে শুধু বাকিটা কপি হবে +E1795 বদলের আগের শেষ কপি ব্যর্থ – কিছুই বদলানো হয়নি +E1796 প্রথমে সবকিছু কপি করুন +E1797 একটি সরানো ইতিমধ্যে চলছে +P398 $1 · নতুন ড্রাইভে খালি: $2 +P399 অজানা ড্রাইভ $1 +P400 ড্রাইভ $1 মাউন্ট করা নেই diff --git a/tools/i18n/catalog.json b/tools/i18n/catalog.json index 64e8218c..71d928dd 100644 --- a/tools/i18n/catalog.json +++ b/tools/i18n/catalog.json @@ -1757,7 +1757,48 @@ "Install from an unsigned source?", "This app comes from a store source without a valid signature of the ShareOS project.", "Its checksum only shows that the download is complete – not who made it.", - "catalog signature missing or invalid – not used" + "catalog signature missing or invalid – not used", + "MOVE TO A NEW DRIVE", + "DISK CHANGE", + "Copies everything from an old drive to a new one – shares, personal folders and the app area – and then switches over, so that nothing has to be set up again.", + "1 · CHOOSE THE DRIVES", + "OLD DRIVE (FROM)", + "NEW DRIVE (TO)", + "The new drive must be set up and empty, with ext4 or Btrfs. It can be in the second bay or in a USB case – after the move it can go into a bay. Set it up first under", + "An old disk in a USB case is added there without erasing it (a disk with data).", + "Personal folders", + "Snapshot jobs", + "Data", + "moves along", + "Everything on the old drive is copied – also folders that are not shared – except the snapshots. Owners, permissions and ACLs stay. The old drive is not changed.", + "Check", + "Start copying", + "2 · COPYING", + "3 · SWITCHING", + "3 · SWITCH", + "Services are stopped for the last copy – shares are back in a moment.", + "The box can be used while it copies. What changes until the switch is copied then.", + "Everything is copied.", + "Switching stops shares, apps, downloads and the media server for a short time, copies what changed since and then points shares, personal folders, the app area, the USB copy and snapshot jobs to the new drive.", + "Switch now", + "DONE", + "Shares, personal folders and the app area are now on the new drive.", + "The old drive is unchanged. When everything works, forget it under", + "and take the disk out – or keep it as a backup.", + "The copy was stopped. Going on copies only what is missing.", + "Go on copying", + "Stop copying?", + "What is copied stays on the new drive; going on later copies only the rest.", + "Switch to the new drive now?", + "Shares, apps, downloads and the media server stop for the last copy and start again on the new drive. Open files on the network are closed.", + "source and target are the same drive", + "the new drive needs ext4 or btrfs (owners, personal folders, app area)", + "the new drive is not empty – choose an empty drive", + "not enough free space on the new drive", + "copy failed – see the log; starting again copies only what is missing", + "the last copy before switching failed – nothing was switched", + "copy everything first", + "a move is already running" ], "patterns": [ [ @@ -3351,6 +3392,18 @@ [ "^The folder (\\S+) is kept, but the account cannot open it any more – not over SMB and not in the web interface\\. Cloud sync, the Paperless inbox and apps that keep their settings there stop working for this account\\.$", "The folder $1 is kept, but the account cannot open it any more – not over SMB and not in the web interface. Cloud sync, the Paperless inbox and apps that keep their settings there stop working for this account." + ], + [ + "^(\\S+ \\S+) · free on the new drive: (\\S+ \\S+)$", + "$1 · free on the new drive: $2" + ], + [ + "^unknown drive (\\S+)$", + "unknown drive $1" + ], + [ + "^drive (\\S+) is not mounted$", + "drive $1 is not mounted" ] ], "words": [ diff --git a/tools/i18n/de.tsv b/tools/i18n/de.tsv index ce16bbe5..3a7a5423 100644 --- a/tools/i18n/de.tsv +++ b/tools/i18n/de.tsv @@ -2181,3 +2181,47 @@ E1753 Aus einer nicht signierten Quelle installieren? E1754 Diese App stammt aus einer Store-Quelle ohne gültige Signatur des ShareOS-Projekts. E1755 Ihre Prüfsumme zeigt nur, dass der Download vollständig ist – nicht, wer sie gemacht hat. E1756 Katalog-Signatur fehlt oder ist ungültig – nicht verwendet +E1757 UMZUG AUF EIN NEUES LAUFWERK +E1758 PLATTENWECHSEL +E1759 Kopiert alles von einem alten auf ein neues Laufwerk – Freigaben, persönliche Ordner und den App-Bereich – und schaltet dann um, sodass nichts neu eingerichtet werden muss. +E1760 1 · LAUFWERKE WÄHLEN +E1761 ALTES LAUFWERK (VON) +E1762 NEUES LAUFWERK (NACH) +E1763 Das neue Laufwerk muss eingerichtet und leer sein, mit ext4 oder Btrfs. Es kann im zweiten Schacht oder in einem USB-Gehäuse stecken – nach dem Umzug kann es in einen Schacht. Zuerst einrichten unter +E1764 Eine alte Platte im USB-Gehäuse wird dort ohne Löschen hinzugefügt (Platte mit Daten). +E1765 Persönliche Ordner +E1766 Snapshot-Aufträge +E1767 Daten +E1768 zieht mit um +E1769 Alles auf dem alten Laufwerk wird kopiert – auch Ordner, die nicht freigegeben sind – außer den Snapshots. Besitzer, Rechte und ACLs bleiben. Das alte Laufwerk wird nicht verändert. +E1770 Prüfen +E1771 Kopieren starten +E1772 2 · KOPIEREN +E1773 3 · UMSCHALTEN LÄUFT +E1774 3 · UMSCHALTEN +E1775 Die Dienste sind für den letzten Abgleich angehalten – die Freigaben sind gleich wieder da. +E1776 Die Box ist während des Kopierens benutzbar. Was sich bis zum Umschalten ändert, wird dann übernommen. +E1777 Alles ist kopiert. +E1778 Beim Umschalten halten Freigaben, Apps, Downloads und der Medienserver kurz an; was sich seitdem geändert hat, wird kopiert, dann zeigen Freigaben, persönliche Ordner, App-Bereich, USB-Kopie und Snapshot-Aufträge auf das neue Laufwerk. +E1779 Jetzt umschalten +E1780 FERTIG +E1781 Freigaben, persönliche Ordner und der App-Bereich liegen jetzt auf dem neuen Laufwerk. +E1782 Das alte Laufwerk ist unverändert. Wenn alles läuft, unter +E1783 vergessen und die Platte herausnehmen – oder als Sicherung behalten. +E1784 Das Kopieren wurde angehalten. Weitermachen kopiert nur, was noch fehlt. +E1785 Weiter kopieren +E1786 Kopieren anhalten? +E1787 Was kopiert ist, bleibt auf dem neuen Laufwerk; später weitermachen kopiert nur den Rest. +E1788 Jetzt auf das neue Laufwerk umschalten? +E1789 Freigaben, Apps, Downloads und der Medienserver halten für den letzten Abgleich an und starten auf dem neuen Laufwerk neu. Im Netzwerk geöffnete Dateien werden geschlossen. +E1790 Quelle und Ziel sind dasselbe Laufwerk +E1791 das neue Laufwerk braucht ext4 oder Btrfs (Besitzer, persönliche Ordner, App-Bereich) +E1792 das neue Laufwerk ist nicht leer – wähle ein leeres Laufwerk +E1793 nicht genug freier Platz auf dem neuen Laufwerk +E1794 Kopieren fehlgeschlagen – siehe Protokoll; ein neuer Start kopiert nur, was fehlt +E1795 der letzte Abgleich vor dem Umschalten ist fehlgeschlagen – nichts wurde umgestellt +E1796 zuerst alles kopieren +E1797 ein Umzug läuft bereits +P398 $1 · frei auf dem neuen Laufwerk: $2 +P399 unbekanntes Laufwerk $1 +P400 Laufwerk $1 ist nicht eingehängt diff --git a/tools/i18n/es.tsv b/tools/i18n/es.tsv index 4a50b9aa..0b49f7be 100644 --- a/tools/i18n/es.tsv +++ b/tools/i18n/es.tsv @@ -2197,3 +2197,47 @@ E1753 ¿Instalar desde una fuente sin firmar? E1754 Esta app procede de una fuente de la tienda sin una firma válida del proyecto ShareOS. E1755 Su suma de comprobación solo muestra que la descarga está completa, no quién la hizo. E1756 falta la firma del catálogo o no es válida – no se usa +E1757 MOVER A UNA UNIDAD NUEVA +E1758 CAMBIO DE DISCO +E1759 Copia todo de una unidad antigua a una nueva – recursos compartidos, carpetas personales y el área de apps – y luego cambia, sin tener que configurar nada de nuevo. +E1760 1 · ELEGIR LAS UNIDADES +E1761 UNIDAD ANTIGUA (DESDE) +E1762 UNIDAD NUEVA (HACIA) +E1763 La unidad nueva debe estar configurada y vacía, con ext4 o Btrfs. Puede estar en la segunda bahía o en una caja USB; tras el traslado puede ir a una bahía. Configúrala primero en +E1764 Un disco antiguo en una caja USB se añade allí sin borrarlo (disco con datos). +E1765 Carpetas personales +E1766 Tareas de instantáneas +E1767 Datos +E1768 se mueve también +E1769 Se copia todo lo de la unidad antigua – también carpetas no compartidas – excepto las instantáneas. Propietarios, permisos y ACL se mantienen. La unidad antigua no se modifica. +E1770 Comprobar +E1771 Empezar a copiar +E1772 2 · COPIANDO +E1773 3 · CAMBIANDO +E1774 3 · CAMBIAR +E1775 Los servicios están detenidos para la última copia; los recursos compartidos vuelven en un momento. +E1776 La caja se puede usar mientras copia. Lo que cambie hasta el cambio se copia entonces. +E1777 Todo está copiado. +E1778 El cambio detiene brevemente recursos compartidos, apps, descargas y el servidor multimedia, copia lo que cambió desde entonces y luego apunta recursos compartidos, carpetas personales, área de apps, copia USB y tareas de instantáneas a la unidad nueva. +E1779 Cambiar ahora +E1780 HECHO +E1781 Los recursos compartidos, las carpetas personales y el área de apps están ahora en la unidad nueva. +E1782 La unidad antigua no ha cambiado. Cuando todo funcione, olvídala en +E1783 y saca el disco, o guárdalo como copia de seguridad. +E1784 La copia se detuvo. Continuar copia solo lo que falta. +E1785 Seguir copiando +E1786 ¿Detener la copia? +E1787 Lo copiado se queda en la unidad nueva; continuar más tarde copia solo el resto. +E1788 ¿Cambiar ahora a la unidad nueva? +E1789 Recursos compartidos, apps, descargas y el servidor multimedia se detienen para la última copia y vuelven a arrancar en la unidad nueva. Los archivos abiertos en la red se cierran. +E1790 el origen y el destino son la misma unidad +E1791 la unidad nueva necesita ext4 o btrfs (propietarios, carpetas personales, área de apps) +E1792 la unidad nueva no está vacía: elige una unidad vacía +E1793 no hay suficiente espacio libre en la unidad nueva +E1794 la copia falló: mira el registro; volver a empezar copia solo lo que falta +E1795 la última copia antes del cambio falló: no se cambió nada +E1796 copia todo primero +E1797 ya hay un traslado en curso +P398 $1 · libre en la unidad nueva: $2 +P399 unidad desconocida $1 +P400 la unidad $1 no está montada diff --git a/tools/i18n/fr.tsv b/tools/i18n/fr.tsv index 8a243854..3213becf 100644 --- a/tools/i18n/fr.tsv +++ b/tools/i18n/fr.tsv @@ -2197,3 +2197,47 @@ E1753 Installer depuis une source non signée ? E1754 Cette application provient d’une source du store sans signature valide du projet ShareOS. E1755 Sa somme de contrôle montre seulement que le téléchargement est complet – pas qui l’a créée. E1756 signature du catalogue absente ou invalide – non utilisé +E1757 DÉMÉNAGER VERS UN NOUVEAU DISQUE +E1758 CHANGEMENT DE DISQUE +E1759 Copie tout d’un ancien disque vers un nouveau – partages, dossiers personnels et zone des applications – puis bascule, sans rien avoir à reconfigurer. +E1760 1 · CHOISIR LES DISQUES +E1761 ANCIEN DISQUE (DEPUIS) +E1762 NOUVEAU DISQUE (VERS) +E1763 Le nouveau disque doit être configuré et vide, en ext4 ou Btrfs. Il peut être dans la deuxième baie ou dans un boîtier USB – après le déménagement, il peut aller dans une baie. Configurez-le d’abord sous +E1764 Un ancien disque dans un boîtier USB y est ajouté sans être effacé (disque avec données). +E1765 Dossiers personnels +E1766 Tâches d’instantanés +E1767 Données +E1768 déménage aussi +E1769 Tout ce qui est sur l’ancien disque est copié – y compris les dossiers non partagés – sauf les instantanés. Propriétaires, droits et ACL sont conservés. L’ancien disque n’est pas modifié. +E1770 Vérifier +E1771 Lancer la copie +E1772 2 · COPIE +E1773 3 · BASCULEMENT EN COURS +E1774 3 · BASCULER +E1775 Les services sont arrêtés pour la dernière copie – les partages reviennent dans un instant. +E1776 La box reste utilisable pendant la copie. Ce qui change d’ici le basculement est copié à ce moment-là. +E1777 Tout est copié. +E1778 Le basculement arrête brièvement partages, applications, téléchargements et serveur multimédia, copie ce qui a changé depuis, puis fait pointer partages, dossiers personnels, zone des applications, copie USB et tâches d’instantanés vers le nouveau disque. +E1779 Basculer maintenant +E1780 TERMINÉ +E1781 Les partages, dossiers personnels et la zone des applications sont maintenant sur le nouveau disque. +E1782 L’ancien disque est inchangé. Quand tout fonctionne, oubliez-le sous +E1783 et retirez le disque – ou gardez-le comme sauvegarde. +E1784 La copie a été arrêtée. Reprendre ne copie que ce qui manque. +E1785 Reprendre la copie +E1786 Arrêter la copie ? +E1787 Ce qui est copié reste sur le nouveau disque ; reprendre plus tard ne copie que le reste. +E1788 Basculer maintenant vers le nouveau disque ? +E1789 Partages, applications, téléchargements et serveur multimédia s’arrêtent pour la dernière copie et redémarrent sur le nouveau disque. Les fichiers ouverts sur le réseau sont fermés. +E1790 la source et la cible sont le même disque +E1791 le nouveau disque doit être en ext4 ou btrfs (propriétaires, dossiers personnels, zone des applications) +E1792 le nouveau disque n’est pas vide – choisissez un disque vide +E1793 pas assez d’espace libre sur le nouveau disque +E1794 échec de la copie – voir le journal ; relancer ne copie que ce qui manque +E1795 la dernière copie avant le basculement a échoué – rien n’a été basculé +E1796 copiez d’abord tout +E1797 un déménagement est déjà en cours +P398 $1 · libre sur le nouveau disque : $2 +P399 disque inconnu $1 +P400 le disque $1 n’est pas monté diff --git a/tools/i18n/hi.tsv b/tools/i18n/hi.tsv index ffadf530..71ec551e 100644 --- a/tools/i18n/hi.tsv +++ b/tools/i18n/hi.tsv @@ -2197,3 +2197,47 @@ E1753 बिना हस्ताक्षर वाले स्रोत स E1754 यह ऐप ऐसे स्टोर स्रोत से है जिस पर ShareOS प्रोजेक्ट का कोई मान्य हस्ताक्षर नहीं है। E1755 इसका चेकसम केवल यह दिखाता है कि डाउनलोड पूरा है – यह नहीं कि इसे किसने बनाया। E1756 कैटलॉग हस्ताक्षर नहीं है या अमान्य है – उपयोग नहीं किया गया +E1757 नई ड्राइव पर ले जाएँ +E1758 डिस्क बदलना +E1759 पुरानी ड्राइव से सब कुछ नई ड्राइव पर कॉपी करता है – शेयर, निजी फ़ोल्डर और ऐप क्षेत्र – और फिर उस पर बदल देता है, ताकि कुछ भी दोबारा सेट न करना पड़े। +E1760 1 · ड्राइव चुनें +E1761 पुरानी ड्राइव (से) +E1762 नई ड्राइव (तक) +E1763 नई ड्राइव सेट अप और खाली होनी चाहिए, ext4 या Btrfs के साथ। वह दूसरे बे में या USB केस में हो सकती है – ले जाने के बाद उसे बे में लगाया जा सकता है। पहले उसे यहाँ सेट अप करें: +E1764 USB केस में पुरानी डिस्क वहाँ बिना मिटाए जोड़ी जाती है (डेटा वाली डिस्क)। +E1765 निजी फ़ोल्डर +E1766 स्नैपशॉट कार्य +E1767 डेटा +E1768 साथ में जाता है +E1769 पुरानी ड्राइव पर सब कुछ कॉपी होता है – बिना शेयर वाले फ़ोल्डर भी – स्नैपशॉट को छोड़कर। मालिक, अनुमतियाँ और ACL बने रहते हैं। पुरानी ड्राइव नहीं बदली जाती। +E1770 जाँचें +E1771 कॉपी करना शुरू करें +E1772 2 · कॉपी हो रहा है +E1773 3 · बदला जा रहा है +E1774 3 · बदलें +E1775 आख़िरी कॉपी के लिए सेवाएँ रुकी हैं – शेयर कुछ ही पल में लौट आएँगे। +E1776 कॉपी होते समय बॉक्स का उपयोग किया जा सकता है। बदलने तक जो बदलता है, वह तब कॉपी होता है। +E1777 सब कुछ कॉपी हो गया। +E1778 बदलने पर शेयर, ऐप, डाउनलोड और मीडिया सर्वर थोड़ी देर रुकते हैं, तब से जो बदला वह कॉपी होता है, फिर शेयर, निजी फ़ोल्डर, ऐप क्षेत्र, USB कॉपी और स्नैपशॉट कार्य नई ड्राइव की ओर हो जाते हैं। +E1779 अभी बदलें +E1780 पूरा +E1781 शेयर, निजी फ़ोल्डर और ऐप क्षेत्र अब नई ड्राइव पर हैं। +E1782 पुरानी ड्राइव अपरिवर्तित है। सब ठीक चलने पर उसे यहाँ भूल जाएँ: +E1783 और डिस्क निकाल लें – या उसे बैकअप के रूप में रखें। +E1784 कॉपी रोकी गई। जारी रखने पर केवल जो बचा है वही कॉपी होगा। +E1785 कॉपी जारी रखें +E1786 कॉपी रोकें? +E1787 जो कॉपी हो चुका है वह नई ड्राइव पर रहता है; बाद में जारी रखने पर केवल बाकी कॉपी होगा। +E1788 अभी नई ड्राइव पर बदलें? +E1789 आख़िरी कॉपी के लिए शेयर, ऐप, डाउनलोड और मीडिया सर्वर रुकते हैं और नई ड्राइव पर फिर से शुरू होते हैं। नेटवर्क पर खुली फ़ाइलें बंद हो जाती हैं। +E1790 स्रोत और लक्ष्य एक ही ड्राइव हैं +E1791 नई ड्राइव को ext4 या btrfs चाहिए (मालिक, निजी फ़ोल्डर, ऐप क्षेत्र) +E1792 नई ड्राइव खाली नहीं है – कोई खाली ड्राइव चुनें +E1793 नई ड्राइव पर पर्याप्त खाली जगह नहीं है +E1794 कॉपी विफल – लॉग देखें; दोबारा शुरू करने पर केवल बचा हुआ कॉपी होगा +E1795 बदलने से पहले की आख़िरी कॉपी विफल रही – कुछ नहीं बदला गया +E1796 पहले सब कुछ कॉपी करें +E1797 एक स्थानांतरण पहले से चल रहा है +P398 $1 · नई ड्राइव पर खाली: $2 +P399 अज्ञात ड्राइव $1 +P400 ड्राइव $1 माउंट नहीं है diff --git a/tools/i18n/pt.tsv b/tools/i18n/pt.tsv index 0748e926..43a33316 100644 --- a/tools/i18n/pt.tsv +++ b/tools/i18n/pt.tsv @@ -2197,3 +2197,47 @@ E1753 Instalar a partir de uma fonte não assinada? E1754 Esta app vem de uma fonte da loja sem uma assinatura válida do projeto ShareOS. E1755 A sua soma de verificação só mostra que a transferência está completa – não quem a fez. E1756 assinatura do catálogo em falta ou inválida – não usado +E1757 MOVER PARA UMA NOVA UNIDADE +E1758 TROCA DE DISCO +E1759 Copia tudo de uma unidade antiga para uma nova – partilhas, pastas pessoais e a área de apps – e depois muda, sem ter de configurar nada de novo. +E1760 1 · ESCOLHER AS UNIDADES +E1761 UNIDADE ANTIGA (DE) +E1762 NOVA UNIDADE (PARA) +E1763 A nova unidade tem de estar configurada e vazia, com ext4 ou Btrfs. Pode estar no segundo compartimento ou numa caixa USB – depois da mudança pode ir para um compartimento. Configure-a primeiro em +E1764 Um disco antigo numa caixa USB é adicionado aí sem ser apagado (disco com dados). +E1765 Pastas pessoais +E1766 Tarefas de instantâneos +E1767 Dados +E1768 muda também +E1769 Tudo o que está na unidade antiga é copiado – também pastas não partilhadas – exceto os instantâneos. Donos, permissões e ACL mantêm-se. A unidade antiga não é alterada. +E1770 Verificar +E1771 Começar a copiar +E1772 2 · A COPIAR +E1773 3 · A MUDAR +E1774 3 · MUDAR +E1775 Os serviços estão parados para a última cópia – as partilhas voltam dentro de momentos. +E1776 A caixa pode ser usada enquanto copia. O que mudar até à mudança é copiado nessa altura. +E1777 Tudo está copiado. +E1778 A mudança para brevemente partilhas, apps, transferências e o servidor multimédia, copia o que mudou desde então e depois aponta partilhas, pastas pessoais, área de apps, cópia USB e tarefas de instantâneos para a nova unidade. +E1779 Mudar agora +E1780 CONCLUÍDO +E1781 As partilhas, pastas pessoais e a área de apps estão agora na nova unidade. +E1782 A unidade antiga está inalterada. Quando tudo funcionar, esqueça-a em +E1783 e retire o disco – ou guarde-o como cópia de segurança. +E1784 A cópia foi parada. Continuar copia apenas o que falta. +E1785 Continuar a copiar +E1786 Parar a cópia? +E1787 O que foi copiado fica na nova unidade; continuar mais tarde copia só o resto. +E1788 Mudar agora para a nova unidade? +E1789 Partilhas, apps, transferências e o servidor multimédia param para a última cópia e arrancam de novo na nova unidade. Os ficheiros abertos na rede são fechados. +E1790 a origem e o destino são a mesma unidade +E1791 a nova unidade precisa de ext4 ou btrfs (donos, pastas pessoais, área de apps) +E1792 a nova unidade não está vazia – escolha uma unidade vazia +E1793 não há espaço livre suficiente na nova unidade +E1794 a cópia falhou – veja o registo; recomeçar copia só o que falta +E1795 a última cópia antes da mudança falhou – nada foi mudado +E1796 copie tudo primeiro +E1797 já está a decorrer uma mudança +P398 $1 · livre na nova unidade: $2 +P399 unidade desconhecida $1 +P400 a unidade $1 não está montada diff --git a/tools/i18n/ru.tsv b/tools/i18n/ru.tsv index 1bdb9cc8..0d375de9 100644 --- a/tools/i18n/ru.tsv +++ b/tools/i18n/ru.tsv @@ -2197,3 +2197,47 @@ E1753 Установить из неподписанного источника? E1754 Это приложение получено из источника магазина без действительной подписи проекта ShareOS. E1755 Его контрольная сумма показывает лишь, что загрузка завершена, но не то, кто его создал. E1756 подпись каталога отсутствует или недействительна – не используется +E1757 ПЕРЕНОС НА НОВЫЙ ДИСК +E1758 ЗАМЕНА ДИСКА +E1759 Копирует всё со старого диска на новый – общие папки, личные папки и область приложений – и затем переключается, так что ничего не нужно настраивать заново. +E1760 1 · ВЫБОР ДИСКОВ +E1761 СТАРЫЙ ДИСК (ОТКУДА) +E1762 НОВЫЙ ДИСК (КУДА) +E1763 Новый диск должен быть настроен и пуст, с ext4 или Btrfs. Он может стоять во втором отсеке или в USB-корпусе – после переноса его можно поставить в отсек. Сначала настройте его в разделе +E1764 Старый диск в USB-корпусе добавляется там без стирания (диск с данными). +E1765 Личные папки +E1766 Задания снимков +E1767 Данные +E1768 переносится тоже +E1769 Копируется всё со старого диска – и папки без общего доступа – кроме снимков. Владельцы, права и ACL сохраняются. Старый диск не изменяется. +E1770 Проверить +E1771 Начать копирование +E1772 2 · КОПИРОВАНИЕ +E1773 3 · ПЕРЕКЛЮЧЕНИЕ +E1774 3 · ПЕРЕКЛЮЧИТЬ +E1775 Службы остановлены для последнего копирования – общие папки сейчас вернутся. +E1776 Устройством можно пользоваться во время копирования. Изменения до переключения скопируются тогда. +E1777 Всё скопировано. +E1778 Переключение ненадолго останавливает общие папки, приложения, загрузки и медиасервер, копирует изменения и затем направляет общие папки, личные папки, область приложений, USB-копирование и задания снимков на новый диск. +E1779 Переключить сейчас +E1780 ГОТОВО +E1781 Общие папки, личные папки и область приложений теперь на новом диске. +E1782 Старый диск не изменён. Когда всё работает, забудьте его в разделе +E1783 и извлеките диск – или оставьте его как резервную копию. +E1784 Копирование остановлено. Продолжение скопирует только недостающее. +E1785 Продолжить копирование +E1786 Остановить копирование? +E1787 Скопированное остаётся на новом диске; позже будет скопирован только остаток. +E1788 Переключиться на новый диск сейчас? +E1789 Общие папки, приложения, загрузки и медиасервер остановятся для последнего копирования и снова запустятся на новом диске. Открытые по сети файлы будут закрыты. +E1790 источник и цель – один и тот же диск +E1791 новому диску нужен ext4 или btrfs (владельцы, личные папки, область приложений) +E1792 новый диск не пуст – выберите пустой диск +E1793 недостаточно свободного места на новом диске +E1794 копирование не удалось – см. журнал; повторный запуск скопирует только недостающее +E1795 последнее копирование перед переключением не удалось – ничего не переключено +E1796 сначала скопируйте всё +E1797 перенос уже выполняется +P398 $1 · свободно на новом диске: $2 +P399 неизвестный диск $1 +P400 диск $1 не подключён diff --git a/tools/i18n/zh.tsv b/tools/i18n/zh.tsv index f890ee7d..56319161 100644 --- a/tools/i18n/zh.tsv +++ b/tools/i18n/zh.tsv @@ -2197,3 +2197,47 @@ E1753 从未签名的来源安装? E1754 此应用来自没有 ShareOS 项目有效签名的商店来源。 E1755 其校验和只表明下载完整,并不能说明是谁制作的。 E1756 目录签名缺失或无效——未使用 +E1757 迁移到新驱动器 +E1758 更换磁盘 +E1759 将旧驱动器上的所有内容(共享、个人文件夹和应用区域)复制到新驱动器,然后切换过去,无需重新设置任何内容。 +E1760 1 · 选择驱动器 +E1761 旧驱动器(源) +E1762 新驱动器(目标) +E1763 新驱动器必须已设置且为空,文件系统为 ext4 或 Btrfs。它可以在第二个盘位或 USB 硬盘盒中——迁移后可放入盘位。请先在以下位置设置: +E1764 USB 硬盘盒中的旧磁盘可在那里添加且不会被清除(带数据的磁盘)。 +E1765 个人文件夹 +E1766 快照任务 +E1767 数据 +E1768 一起迁移 +E1769 旧驱动器上的所有内容都会被复制(包括未共享的文件夹),快照除外。所有者、权限和 ACL 保持不变。旧驱动器不会被更改。 +E1770 检查 +E1771 开始复制 +E1772 2 · 复制中 +E1773 3 · 切换中 +E1774 3 · 切换 +E1775 服务已为最后一次复制而停止——共享很快就会恢复。 +E1776 复制期间仍可使用设备。切换前发生的更改会在切换时复制。 +E1777 全部复制完成。 +E1778 切换会短暂停止共享、应用、下载和媒体服务器,复制此后的更改,然后将共享、个人文件夹、应用区域、USB 复制和快照任务指向新驱动器。 +E1779 立即切换 +E1780 完成 +E1781 共享、个人文件夹和应用区域现在位于新驱动器上。 +E1782 旧驱动器未更改。一切正常后,请在以下位置将其移除: +E1783 然后取出磁盘——或将其保留作为备份。 +E1784 复制已停止。继续时只会复制缺少的部分。 +E1785 继续复制 +E1786 停止复制? +E1787 已复制的内容保留在新驱动器上;稍后继续只会复制剩余部分。 +E1788 现在切换到新驱动器? +E1789 共享、应用、下载和媒体服务器会为最后一次复制而停止,并在新驱动器上重新启动。网络上打开的文件会被关闭。 +E1790 源和目标是同一个驱动器 +E1791 新驱动器需要 ext4 或 btrfs(所有者、个人文件夹、应用区域) +E1792 新驱动器不是空的——请选择一个空驱动器 +E1793 新驱动器上的可用空间不足 +E1794 复制失败——请查看日志;重新开始只会复制缺少的部分 +E1795 切换前的最后一次复制失败——未进行任何切换 +E1796 请先复制全部内容 +E1797 迁移已在进行中 +P398 $1 · 新驱动器可用:$2 +P399 未知驱动器 $1 +P400 驱动器 $1 未挂载