lsm_fs_ss_restore(3)

πŸ“¦
version 1.10.3 Β· 3 versions
, in fedora 43, fedora 44

πŸ’– lsm_fs_ss_restore β€” the Libstoragemgmt C API Manual's iconic little time-machine function πŸ’–

okay bestie, sit down, hydrate, because we're talking about lsm_fs_ss_restore(3) β€” the Libstoragemgmt function that literally rewinds your file system back to a previous moment. yes, it's giving undo button but make it enterprise storage. it's a C function, it's a 3 manpage, and it eats snapshots for breakfast. πŸ¦‹


✨ NAME ✨

lsm_fs_ss_restore β€” restores a file system snapshot. no cap, that's the whole gig. πŸŽ€


🌸 SYNOPSIS 🌸

int lsm_fs_ss_restore (lsm_connect *conn, lsm_fs *fs, lsm_fs_ss *ss,
       lsm_string_list *files, lsm_string_list *restore_files, int all_files,
       char **job, lsm_flag flags);

seven arguments. seven. she's high maintenance but she delivers. πŸ’…


πŸ’œ ARGUMENTS πŸ’œ

  • conn β€” a valid connection. like, actually valid. don't be weird about it.
  • fs β€” pointer to the lsm_fs that contains the snapshot. your file system, your problem, your queen πŸ‘‘
  • ss β€” pointer to the lsm_fs_ss you want to restore to. this is the moment in time we're yeeting ourselves back to.
  • files β€” pointer to a lsm_string_list. if it's defined, only the files you specified get restored. if it's NULL and all_files is set to 1, then we restore all the files. that's the deal.
  • restore_files β€” pointer to a lsm_string_list. if it's defined, the restored files get renamed to the file paths and names you list here. glow-up via rename ✨
  • all_files β€” an int. 0 means only restore the defined files, 1 means restore all the files. binary queen, no in-between.
  • job β€” output pointer of string. if the storage system supports asynchronous action on this, a job gets created and you can track it via lsm_job_status_get. if the storage system doesn't support asynchronous action on this, it's NULL. lowkey sad but we move. πŸ™ˆ
  • flags β€” reserved for future use, and it must be LSM_CLIENT_FLAG_RSVD. do not freestyle this one. fr fr.

πŸŽ€ VERSION πŸŽ€

1.0


πŸ¦‹ DESCRIPTION πŸ¦‹

Restores a file system or files to a previous state as specified in the snapshot.

that's it. that's the dream. time travel but the storage team signed off on it. πŸ’«


πŸ”₯ CAPABILITY πŸ”₯

LSM_CAP_FS_SNAPSHOT_RESTORE LSM_CAP_FS_SNAPSHOT_RESTORE_SPECIFIC_FILES

two capabilities, both iconic, both required for the full experience. if your system is missing these, it's simply not that girl.


⭐ RETURN ⭐

it hands you back an error code as enumerated by lsm_error_number, and here's the whole guest list:

  • LSM_ERR_OK β€” on success. slay. πŸŽ‰
  • LSM_ERR_JOB_STARTED β€” a job is started. please check the job output pointer, bestie, it's right there.
  • LSM_ERR_INVALID_ARGUMENT β€” when any argument is NULL or not a valid lsm_connect pointer, or the flags are invalid. basically: you did the most, and not in a good way. πŸ’€
  • LSM_ERR_NOT_FOUND_FS β€” when the file system is not found. she's not here. she left no forwarding address.
  • LSM_ERR_NOT_FOUND_FS_SS β€” when the file system snapshot is not found. no snapshot, no rewind, no vibes. 😭
  • LSM_ERR_NO_SUPPORT β€” not supported. the storage system said "not my era." 🫢

heads up bestie: that flags argument really does have to be LSM_CLIENT_FLAG_RSVD. it's reserved for future use, so don't go inventing values, okay? and if you get LSM_ERR_JOB_STARTED, actually go look at the job pointer β€” the work is happening asynchronously and you gotta track it with lsm_job_status_get. main character energy requires follow-through. πŸ’–

that's the whole page, and honestly? she ate. this was lsm_fs_ss_restore from the Libstoragemgmt C API Manual, version 1.0, dated February 2026 β€” and it lives at section 3 as lsm_fs_ss_restore(3). mwah. bye bestie, go restore something responsibly. πŸŒˆπŸ’…πŸ§š

πŸ“¦ where this page comes from