Προς το περιεχόμενο

System tar & restore Project


tritonas00

Προτεινόμενες αναρτήσεις

ok backup script

ok restore script

 

:P

 

να κοιτάξετε αυτό με το home αν μπορεί να γίνει επιλογή εάν θα γίνει backup η όχι

αυτό που θα ήθελα εγώ για να είμαι καλυμμένος να μπορώ να κάνω mount το δίσκο και απλά να τρέξω το tar για restore, δλδ να παρακάμψει το mount και copy στο /media

 

θα μου πεις μα έτσι τράβα την εντολή με το χέρι και τέλος αλλά είναι πιο εύκολο να ξέρεις ότι μπορείς να τραβήξεις ένα git clone και να παίξει

 

.....

στο restore είχα κάνει ματσακανιά οπότε καλά σου έβγαζε

it's not a bug, it's a feature :D :D

....

έχεις i-κατι ε ?

:lol:

Συνδέστε για να σχολιάσετε
Κοινοποίηση σε άλλες σελίδες

  • Απαντ. 1,6k
  • Δημ.
  • Τελ. απάντηση

Συχνή συμμετοχή στο θέμα

Η df ενημερωνεται σωστα.

 

Απλα πρεπει να μπει μετα, αφου γινουν mounted οι συσκευες.

 

Πχ για το sdb1

 

Πριν το format:

 

>
mkdir /media/target
[root@Desktop Downloads]# mount /dev/sdb1 /media/target
[root@Desktop Downloads]# df -Th | grep /dev/ | awk '{ print $1" "$2" "$3 }'
/dev/sda3 ext4 193G
tmpfs tmpfs 1.5G
/dev/sdb1 vfat 949M
[root@Desktop Downloads]# blkid -s TYPE -o value
ntfs
ntfs
ext4
swap
vfat

 

Μετα: (απο fat σε ext2)

 

>
umount /dev/sdb1
[root@Desktop Downloads]# mount /dev/sdb1 /media/target
[root@Desktop Downloads]# blkid -s TYPE -o value
ntfs
ntfs
ext4
swap
vfat
[root@Desktop Downloads]# df -Th | grep /dev/ | awk '{ print $1" "$2" "$3 }'
/dev/sda3 ext4 193G
tmpfs tmpfs 1.5G
/dev/sdb1 ext2 936M

 

Ουτως η αλλως για να γραψει σωστα το fstab τα θελουμε, οποτε μπορει να μπει πιο κατω.

 

war, δες μια και τα unary operator expected στο backup οταν μπορεις :P Στο restore διορθωσα καποια που μου πεταξε.

Συνδέστε για να σχολιάσετε
Κοινοποίηση σε άλλες σελίδες

το backup πέταγε unary operator expected εκεί που έσκαγε του martinoff και το έφτιαξα

σου έχει βγάλει και αλλού?

 

αυτό το βγάζει όταν δεν έχει τιμή η μεταβλητή που συγκρίνεις οπότε πάει να κάνει κάτι σαν

>[ -eq 1]

ενώ έπρεπε να κάνει

>[ τιμή_μεταβλήτής -eq 1 ]

 

στο restore πρέπει να έριχνε στις γραμμές 197-205 αν έχει τρέξει το script μόνο με root partition

με : φτιάχνει? δεν το έχω ξαναδεί ποτέ

αν όχι να τα κάνουμε πχ

>if [ -n $swap ] && [ $swap -eq -1 ];

  • Like 1
Συνδέστε για να σχολιάσετε
Κοινοποίηση σε άλλες σελίδες

Nαι οταν εβαλα : δεν ξαναπεταξε τωρα τι να σου πω :P

 

Επισης κατι παιζει με τα arguments.

 

Δινω:

 

./restore -r /dev/sdb1 -g /dev/sdb -f /home/babis/Files/image.tgz

 

και γινεται χαμος. Το εχω συνταξει λαθος ?

Συνδέστε για να σχολιάσετε
Κοινοποίηση σε άλλες σελίδες

 

 

 

Copying file...

cp: cannot create regular file ‘/media/target/fullbackup.tgz’: No such file or directory

Saturday-15-12-2012-18:44

 

---------------READING INPUT VARIABLES---------------

./restore: line 198: [: -1: unary operator expected

./restore: line 201: [: -1: unary operator expected

./restore: line 204: [: -1: unary operator expected

 

---------------MAKING WORKING DIRECTORY---------------

SUCCESS

 

---------------MOUNTING /dev/sdb1 (/)---------------

SUCCESS

 

---------------MOUNTING -1 (/home)---------------

mount: invalid option -- '1'

 

Usage:

mount [-lhV]

mount -a [options]

mount [options] [--source] <source> | [--target] <directory>

mount [options] <source> <directory>

mount <operation> <mountpoint> [<target>]

 

Options:

-a, --all mount all filesystems mentioned in fstab

-c, --no-canonicalize don't canonicalize paths

-f, --fake dry run; skip the mount(2) syscall

-F, --fork fork off for each device (use with -a)

-T, --fstab <path> alternative file to /etc/fstab

-h, --help display this help text and exit

-i, --internal-only don't call the mount.<type> helpers

-l, --show-labels lists all mounts with LABELs

-n, --no-mtab don't write to /etc/mtab

-o, --options <list> comma-separated list of mount options

-O, --test-opts <list> limit the set of filesystems (use with -a)

-p, --pass-fd <num> read the passphrase from file descriptor

-r, --read-only mount the filesystem read-only (same as -o ro)

-t, --types <list> limit the set of filesystem types

--source <src> explicitly specifies source (path, label, uuid)

--target <target> explicitly specifies mountpoint

-v, --verbose say what is being done

-V, --version display version information and exit

-w, --read-write mount the filesystem read-write (default)

 

-h, --help display this help and exit

-V, --version output version information and exit

 

Source:

-L, --label <label> synonym for LABEL=<label>

-U, --uuid <uuid> synonym for UUID=<uuid>

LABEL=<label> specifies device by filesystem label

UUID=<uuid> specifies device by filesystem UUID

PARTLABEL=<label> specifies device by partition label

PARTUUID=<uuid> specifies device by partition UUID

<device> specifies device by path

<directory> mountpoint for bind mounts (see --bind/rbind)

<file> regular file for loopdev setup

 

Operations:

-B, --bind mount a subtree somewhere else (same as -o bind)

-M, --move move a subtree to some other place

-R, --rbind mount a subtree and all submounts somewhere else

--make-shared mark a subtree as shared

--make-slave mark a subtree as slave

--make-private mark a subtree as private

--make-unbindable mark a subtree as unbindable

--make-rshared recursively mark a whole subtree as shared

--make-rslave recursively mark a whole subtree as slave

--make-rprivate recursively mark a whole subtree as private

--make-runbindable recursively mark a whole subtree as unbindable

 

For more details see mount(8).

WARNING

 

---------------MOUNTING -1 (/boot)---------------

mount: invalid option -- '1'

 

Usage:

mount [-lhV]

mount -a [options]

mount [options] [--source] <source> | [--target] <directory>

mount [options] <source> <directory>

mount <operation> <mountpoint> [<target>]

 

Options:

-a, --all mount all filesystems mentioned in fstab

-c, --no-canonicalize don't canonicalize paths

-f, --fake dry run; skip the mount(2) syscall

-F, --fork fork off for each device (use with -a)

-T, --fstab <path> alternative file to /etc/fstab

-h, --help display this help text and exit

-i, --internal-only don't call the mount.<type> helpers

-l, --show-labels lists all mounts with LABELs

-n, --no-mtab don't write to /etc/mtab

-o, --options <list> comma-separated list of mount options

-O, --test-opts <list> limit the set of filesystems (use with -a)

-p, --pass-fd <num> read the passphrase from file descriptor

-r, --read-only mount the filesystem read-only (same as -o ro)

-t, --types <list> limit the set of filesystem types

--source <src> explicitly specifies source (path, label, uuid)

--target <target> explicitly specifies mountpoint

-v, --verbose say what is being done

-V, --version display version information and exit

-w, --read-write mount the filesystem read-write (default)

 

-h, --help display this help and exit

-V, --version output version information and exit

 

Source:

-L, --label <label> synonym for LABEL=<label>

-U, --uuid <uuid> synonym for UUID=<uuid>

LABEL=<label> specifies device by filesystem label

UUID=<uuid> specifies device by filesystem UUID

PARTLABEL=<label> specifies device by partition label

PARTUUID=<uuid> specifies device by partition UUID

<device> specifies device by path

<directory> mountpoint for bind mounts (see --bind/rbind)

<file> regular file for loopdev setup

 

Operations:

-B, --bind mount a subtree somewhere else (same as -o bind)

-M, --move move a subtree to some other place

-R, --rbind mount a subtree and all submounts somewhere else

--make-shared mark a subtree as shared

--make-slave mark a subtree as slave

--make-private mark a subtree as private

--make-unbindable mark a subtree as unbindable

--make-rshared recursively mark a whole subtree as shared

--make-rslave recursively mark a whole subtree as slave

--make-rprivate recursively mark a whole subtree as private

--make-runbindable recursively mark a whole subtree as unbindable

 

For more details see mount(8).

WARNING

 

---------------GETTING TAR IMAGE---------------

 

Select an option or enter Q to quit

1) File

2) URL

3) Protected URL

Choice:

 

 

 

Kαι οταν παταω q

 

 

 

 

Choice: q

Now quiting

umount: invalid option -- '1'

 

Usage:

umount [-hV]

umount -a [options]

umount [options] <source> | <directory>

 

Options:

-a, --all umount all filesystems

-c, --no-canonicalize don't canonicalize paths

-d, --detach-loop if mounted loop device, also free this loop device

--fake dry run; skip the umount(2) syscall

-f, --force force unmount (in case of an unreachable NFS system)

-i, --internal-only don't call the umount.<type> helpers

-n, --no-mtab don't write to /etc/mtab

-l, --lazy detach the filesystem now, and cleanup all later

-O, --test-opts <list> limit the set of filesystems (use with -a)

-r, --read-only In case unmounting fails, try to remount read-only

-t, --types <list> limit the set of filesystem types

-v, --verbose say what is being done

 

-h, --help display this help and exit

-V, --version output version information and exit

 

For more details see umount(8).

umount: invalid option -- '1'

 

Usage:

umount [-hV]

umount -a [options]

umount [options] <source> | <directory>

 

Options:

-a, --all umount all filesystems

-c, --no-canonicalize don't canonicalize paths

-d, --detach-loop if mounted loop device, also free this loop device

--fake dry run; skip the umount(2) syscall

-f, --force force unmount (in case of an unreachable NFS system)

-i, --internal-only don't call the umount.<type> helpers

-n, --no-mtab don't write to /etc/mtab

-l, --lazy detach the filesystem now, and cleanup all later

-O, --test-opts <list> limit the set of filesystems (use with -a)

-r, --read-only In case unmounting fails, try to remount read-only

-t, --types <list> limit the set of filesystem types

-v, --verbose say what is being done

 

-h, --help display this help and exit

-V, --version output version information and exit

 

For more details see umount(8).

SUCCESS

 

 

Συνδέστε για να σχολιάσετε
Κοινοποίηση σε άλλες σελίδες

ω παναγία μου

πρώτα σκάει γιατί δεν υπάρχει το target που πάμε να κάνουμε copy το αρχείο αφού δεν έχει γίνει mount ακόμα

μετά σκάει με τα unary operator που δε δουλεύει ούτε το δικό σου ούτε αυτό που έλεγα (το δοκίμασα), αλλά βρήκα τη λύση όπως το είχες κάνει στην αρχή κάπου

κάτσε μισό να τα διορθώσω να το ξαναδοκιμάσεις

 

update για δοκίμασε τώρα

  • Like 1
Συνδέστε για να σχολιάσετε
Κοινοποίηση σε άλλες σελίδες

αν τα πάρουμε από το df λογικά δε θα μπορεί να τα δείχνει στη λίστα αρχικά, εκτός αν πει ο ημίθεος καμιά μαγεία πάλι

να το κάνω να δείχνει μόνο όνομα και μέγεθος?

Συνδέστε για να σχολιάσετε
Κοινοποίηση σε άλλες σελίδες

Λες ?

 

και το fstab να το φτιαχνει απο την df ?

 

Τουλαχιστον να εχουμε σωστο fstab οποτε καντο ετσι οταν μπορεις, και αν ειναι ας δωσει καμια ιδεα ο imitheos.

Συνδέστε για να σχολιάσετε
Κοινοποίηση σε άλλες σελίδες

Δεν ξερω, αλλα υπαρχει η περιπτωση να θελει ο αλλος απο το υπαρχον συστημα του να κανει restore σε δευτερο σκληρο ή σε ενα φλασακι.

Συνδέστε για να σχολιάσετε
Κοινοποίηση σε άλλες σελίδες

Αλλο ενα θεματακι.

 

Αν του πω να παρει το αρχει απο url σαν argument πχ

 

-u ftp://192.168.x.x/babis/data/Backups/test-backup.tgz

 

παει να κανει login σαν root

 

Logging in as root ...

The server refuses login.

Retrying.

 

Απο μεσα, δεν εχει θεμα το κατεβαζει κανονικα.

Συνδέστε για να σχολιάσετε
Κοινοποίηση σε άλλες σελίδες

Δημιουργήστε ένα λογαριασμό ή συνδεθείτε για να σχολιάσετε

Πρέπει να είστε μέλος για να αφήσετε σχόλιο

Δημιουργία λογαριασμού

Εγγραφείτε με νέο λογαριασμό στην κοινότητα μας. Είναι πανεύκολο!

Δημιουργία νέου λογαριασμού

Σύνδεση

Έχετε ήδη λογαριασμό; Συνδεθείτε εδώ.

Συνδεθείτε τώρα
  • Δημιουργία νέου...